Skip to content

Commit

Permalink
Serialize empty options to null (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilovanovM authored Jan 8, 2024
1 parent b110ffe commit 7dbb349
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 7dbb349

Please sign in to comment.