perf: 优化 warning

pull/10003/head
ibuler 2 years ago
parent 12db64ea18
commit eac4b41783

@ -111,7 +111,7 @@ class BaseFileParser(BaseParser):
return {'pk': obj_id, 'name': obj_name}
def parse_value(self, field, value):
if value is '-' and field and field.allow_null:
if value == '-' and field and field.allow_null:
return None
elif hasattr(field, 'to_file_internal_value'):
value = field.to_file_internal_value(value)

Loading…
Cancel
Save