feat: envdata create时忽略IntegrityError

This commit is contained in:
caoqianming 2024-05-11 16:35:52 +08:00
parent 77434b0ec8
commit 9fe86eeb63
1 changed files with 2 additions and 2 deletions

View File

@ -397,5 +397,5 @@ def insert_mplogx_from_king_rest_chunk(objs: list):
for _, item in enp_mpoints_dict.items():
try:
EnvData.objects.create(**item)
except IntegrityError: # 忽略唯一性错误
pass
except IntegrityError as e: # 忽略唯一性错误
myLogger.error(e, exc_info=True)