Skip to content

Commit 3cdde12

Browse files
New Model
1 parent e776aad commit 3cdde12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/strawberry_sqlalchemy_mapper/mapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ async def resolve(self, info: Info):
405405
relationship_key = tuple(
406406
[
407407
[
408-
v.value
409-
for v in instance_state.attrs.values()
410-
if local in getattr(v, "columns", [])
408+
getattr(self, k)
409+
for k, column in self.__mapper__.c.items()
410+
if local.key == column.key
411411
][0]
412412
for local, _ in relationship.local_remote_pairs
413413
]

0 commit comments

Comments
 (0)