Resolve E714 errors

This commit is contained in:
Jeremy Stretch 2024-10-10 16:06:20 -04:00
parent 0398b5fed1
commit c7046ef695

View File

@ -142,7 +142,7 @@ class DynamicModelChoiceMixin:
if data: if data:
# When the field is multiple choice pass the data as a list if it's not already # When the field is multiple choice pass the data as a list if it's not already
if isinstance(bound_field.field, DynamicModelMultipleChoiceField) and not type(data) is list: if isinstance(bound_field.field, DynamicModelMultipleChoiceField) and type(data) is not list:
data = [data] data = [data]
field_name = getattr(self, 'to_field_name') or 'pk' field_name = getattr(self, 'to_field_name') or 'pk'