less queries for space graph view
This commit is contained in:
parent
f7d5c3cdaf
commit
3bdbb57090
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ class EditorViewSet(ViewSet):
|
|||
graphnodes = request.changeset.wrap_model('GraphNode').objects.all()
|
||||
graphnodes = graphnodes.filter((Q(space__in=all_other_spaces)) | Q(space__pk=space.pk))
|
||||
|
||||
space_graphnodes = tuple(node for node in graphnodes if node.space == space)
|
||||
space_graphnodes = tuple(node for node in graphnodes if node.space_id == space.pk)
|
||||
|
||||
graphedges = request.changeset.wrap_model('GraphEdge').objects.all()
|
||||
graphedges = graphedges.filter(Q(from_node__in=space_graphnodes) | Q(to_node__in=space_graphnodes))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue