Made all unit tests pass

This commit is contained in:
Griatch 2019-01-09 22:08:48 +01:00
parent 844b04adbb
commit aa48593a40
10 changed files with 148 additions and 110 deletions

View file

@ -258,12 +258,12 @@ def prototype_from_object(obj):
aliases = obj.aliases.get(return_list=True)
if aliases:
prot['aliases'] = aliases
tags = [(tag.db_key, tag.db_category, tag.db_data)
for tag in obj.tags.all(return_objs=True)]
tags = sorted([(tag.db_key, tag.db_category, tag.db_data)
for tag in obj.tags.all(return_objs=True)])
if tags:
prot['tags'] = tags
attrs = [(attr.key, attr.value, attr.category, ';'.join(attr.locks.all()))
for attr in obj.attributes.all()]
attrs = sorted([(attr.key, attr.value, attr.category, ';'.join(attr.locks.all()))
for attr in obj.attributes.all()])
if attrs:
prot['attrs'] = attrs