Skip to content

Commit

Permalink
serialize empty options to null
Browse files Browse the repository at this point in the history
  • Loading branch information
MilovanovM committed Jan 8, 2024
1 parent b110ffe commit 5008829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangoql/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def serialize_field(self, field):
return result

def serialize_field_options(self, field):
return list(field.get_options('')) if field.suggest_options else []
return list(field.get_options('')) if field.suggest_options else None


class SuggestionsAPISerializer(DjangoQLSchemaSerializer):
Expand Down

0 comments on commit 5008829

Please sign in to comment.