Skip to content
Snippets Groups Projects
Verified Commit abfa222e authored by permcu's avatar permcu Committed by Jonathan Weth
Browse files

Simplify substitutions group lookup

parent 1fb685a1
No related branches found
No related tags found
1 merge request!373Resolve "Substitutions table for new data model"
......@@ -130,16 +130,13 @@ class SubstitutionGroupsType(graphene.ObjectType):
new = graphene.List(GroupType)
def resolve_old(root, info):
if not root.cancelled and root.groups.all() and root.amends.groups.all():
if root.groups.all() and root.amends.groups.all():
return root.amends.groups.all()
else:
return []
def resolve_new(root, info):
if root cancelled:
return root.amends.groups.all()
else:
return root.groups.all() or root.amends.groups.all()
return root.groups.all() or root.amends.groups.all()
class SubstitutionType(graphene.ObjectType):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment