feat: mlogboutupdate兼容性处理

This commit is contained in:
caoqianming 2025-02-28 15:38:36 +08:00
parent 286a5306e3
commit c5bcfb4e53
1 changed files with 8 additions and 9 deletions

View File

@ -748,11 +748,10 @@ class MlogbOutUpdateSerializer(CustomModelSerializer):
def validate(self, attrs):
mlogbdefect = attrs.get("mlogbdefect", [])
if mlogbdefect:
pass
# attrs.pop("count_notok_json")
# for i in attrs:
# if 'count_n_' in i:
# attrs.pop(i, None)
attrs.pop("count_notok_json")
for i in attrs:
if 'count_n_' in i:
attrs.pop(i, None)
else:
count_notok_json = attrs.get('count_notok_json', [])
# count_notok_json字段处理