Skip to content

Commit dfd25f5

Browse files
Fix: While querying embedded document with key value as ObjectID
1 parent abb7bf5 commit dfd25f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_mongo/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def chained_resolver(self, resolver, is_partial, root, info, **args):
433433
if arg_name == '_id' and isinstance(arg, dict):
434434
operation = list(arg.keys())[0]
435435
args_copy['pk' + operation.replace('$', '__')] = arg[operation]
436-
if '.' in arg_name and not isinstance(arg, ObjectId):
436+
if not isinstance(arg, ObjectId) and '.' in arg_name:
437437
operation = list(arg.keys())[0]
438438
args_copy[arg_name.replace('.', '__') + operation.replace('$', '__')] = arg[operation]
439439
else:

0 commit comments

Comments
 (0)