server/util: fix API queries for empty ?options

This commit is contained in:
rr- 2016-11-20 16:02:45 +01:00
parent e21a31e72f
commit 42666706d9

View file

@ -32,7 +32,7 @@ def get_serialization_options(ctx):
def serialize_entity(entity, field_factories, options): def serialize_entity(entity, field_factories, options):
if not entity: if not entity:
return None return None
if not options: if not options or len(options) == 0:
options = field_factories.keys() options = field_factories.keys()
ret = {} ret = {}
for key in options: for key in options: