Tweak relationship for Department._super_parents

since there can be more than one
This commit is contained in:
Lance Edgar 2020-08-20 14:41:08 -05:00
parent e2dc00b469
commit 74a28514dc

View file

@ -100,7 +100,9 @@ class SuperDepartment(Base):
doc="""
Reference to the child department for this mapping.
""",
backref=orm.backref('_super_parent', uselist=False))
backref=orm.backref(
'_super_parents',
order_by=parent_id))
def __str__(self):
return "{} / {}".format(self.parent, self.child)