Fix not jsonifying the parent album.

This commit is contained in:
voussoir 2017-05-13 15:44:03 -07:00
parent 4928095abb
commit c88654346b

View file

@ -9,7 +9,11 @@ def album(a, minimal=False):
}
if not minimal:
j['photos'] = [photo(p) for p in a.photos()]
j['parent'] = a.parent()
parent = a.parent()
if parent is not None:
j['parent'] = album(parent, minimal=True)
else:
j['parent'] = None
j['sub_albums'] = [child.id for child in a.children()]
return j