perf: fix warning

pull/10004/head
ibuler 2023-03-20 09:53:59 +08:00
parent 11232871a2
commit 5fddd0b02b
1 changed files with 1 additions and 1 deletions

View File

@ -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)