From 8e33c6f422b47c6dbc85f916913df5569128263e Mon Sep 17 00:00:00 2001 From: WeiZhixiong Date: Sat, 18 Mar 2023 23:19:51 +0800 Subject: [PATCH] fix: SyntaxWarning, apps/common/drf/parsers/base.py:114, "is" should be "==" --- apps/common/drf/parsers/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/drf/parsers/base.py b/apps/common/drf/parsers/base.py index 7f3d4b055..587da5251 100644 --- a/apps/common/drf/parsers/base.py +++ b/apps/common/drf/parsers/base.py @@ -111,7 +111,7 @@ class BaseFileParser(BaseParser): return {'pk': obj_id, 'name': obj_name} def parse_value(self, field, value): - if value is '-': + if value == '-': return None elif hasattr(field, 'to_file_internal_value'): value = field.to_file_internal_value(value)