Fix nodes query bind_vars - only add bounds when all coordinates present
All checks were successful
Build Docker Image / build (push) Successful in 1m16s
All checks were successful
Build Docker Image / build (push) Successful in 1m16s
This commit is contained in:
@@ -482,20 +482,24 @@ class Query(graphene.ObjectType):
|
||||
LIMIT @offset, @limit
|
||||
RETURN node
|
||||
"""
|
||||
cursor = db.aql.execute(
|
||||
aql,
|
||||
bind_vars={
|
||||
bind_vars = {
|
||||
'transport_type': transport_type,
|
||||
'country': country,
|
||||
'search': search,
|
||||
'offset': 0 if offset is None else offset,
|
||||
'limit': 1000000 if limit is None else limit,
|
||||
}
|
||||
|
||||
# Only add bounds to bind_vars if they are used
|
||||
if west is not None and south is not None and east is not None and north is not None:
|
||||
bind_vars.update({
|
||||
'west': west,
|
||||
'south': south,
|
||||
'east': east,
|
||||
'north': north,
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
cursor = db.aql.execute(aql, bind_vars=bind_vars)
|
||||
|
||||
nodes = []
|
||||
for node in cursor:
|
||||
|
||||
Reference in New Issue
Block a user