Fix nodes_count query bind_vars - only add bounds when 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:
@@ -541,14 +541,21 @@ class Query(graphene.ObjectType):
|
||||
COLLECT WITH COUNT INTO length
|
||||
RETURN length
|
||||
"""
|
||||
cursor = db.aql.execute(aql, bind_vars={
|
||||
bind_vars = {
|
||||
'transport_type': transport_type,
|
||||
'country': country,
|
||||
'west': west,
|
||||
'south': south,
|
||||
'east': east,
|
||||
'north': north,
|
||||
})
|
||||
}
|
||||
|
||||
# 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)
|
||||
return next(cursor, 0)
|
||||
|
||||
def resolve_hub_countries(self, info):
|
||||
|
||||
Reference in New Issue
Block a user