style(import): str(v) == str(val)
parent
9a811c4fcb
commit
01585e1e78
|
@ -37,6 +37,7 @@ class ImportSerializerMixin:
|
|||
|
||||
try:
|
||||
import unicodedata
|
||||
|
||||
unicodedata.numeric(num)
|
||||
return True
|
||||
except (TypeError, ValueError):
|
||||
|
@ -221,7 +222,6 @@ class ImportSerializerMixin:
|
|||
for h_index, h_item in enumerate(hidden_header):
|
||||
for key, val in results.items():
|
||||
if key == h_item:
|
||||
|
||||
select_field = self.import_field_dict.get(key) if key in self.import_field_dict.keys() else None
|
||||
|
||||
choices = (
|
||||
|
@ -229,7 +229,7 @@ class ImportSerializerMixin:
|
|||
)
|
||||
if choices.get("data"):
|
||||
for k, v in choices.get("data").items():
|
||||
if v == val:
|
||||
if str(v) == str(val):
|
||||
val = k
|
||||
elif choices.get("queryset") and choices.get("values_name"):
|
||||
data_list = choices.get("queryset").values(choices.get("values_name"), "id")
|
||||
|
@ -290,6 +290,7 @@ class ExportSerializerMixin:
|
|||
|
||||
try:
|
||||
import unicodedata
|
||||
|
||||
unicodedata.numeric(num)
|
||||
return True
|
||||
except (TypeError, ValueError):
|
||||
|
|
Loading…
Reference in New Issue