Skip to content

Commit 265c870

Browse files
Pre-Commit Changes
1 parent b6cf024 commit 265c870

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/strawberry_sqlalchemy_mapper/mapper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ async def resolve(self, info: Info):
404404
else:
405405
relationship_key = tuple(
406406
[
407-
getattr(self, local.key)
407+
[
408+
x.value
409+
for x in instance_state.attrs.values()
410+
if x.key == local.key
411+
][0]
408412
for local, _ in relationship.local_remote_pairs
409413
]
410414
)

0 commit comments

Comments
 (0)