File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
src/strawberry_sqlalchemy_mapper Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ exclude: '^docs/conf.py'
22
33repos :
44- repo : https://github.com/pre-commit/pre-commit-hooks
5- rev : v4.3 .0
5+ rev : v4.4 .0
66 hooks :
77 - id : trailing-whitespace
88 - id : check-added-large-files
2828# --remove-unused-variables,
2929# ]
3030- repo : https://github.com/hadialqattan/pycln
31- rev : v2.1.1
31+ rev : v2.1.3
3232 hooks :
3333 - id : pycln
3434 args : [--config=setup.cfg]
3939 - id : isort
4040
4141- repo : https://github.com/psf/black
42- rev : 22.8 .0
42+ rev : 23.3 .0
4343 hooks :
4444 - id : black
4545 language_version : python3
5252# additional_dependencies: [black]
5353
5454- repo : https://github.com/PyCQA/flake8
55- rev : 5 .0.4
55+ rev : 6 .0.0
5656 hooks :
5757 - id : flake8
5858 # # You can add flake8 plugins via `additional_dependencies`:
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ async def load_fn(keys: List[Tuple]) -> List[Any]:
3939 def group_by_remote_key (row : Any ) -> Tuple :
4040 return tuple (
4141 [
42- getattr (row , remote .key )
42+ [
43+ getattr (row , k )
44+ for k , column in row .__mapper__ .c .items ()
45+ if remote .key == column .key
46+ ][0 ]
4347 for _ , remote in relationship .local_remote_pairs
4448 ]
4549 )
Original file line number Diff line number Diff line change @@ -413,7 +413,11 @@ async def resolve(self, info: Info):
413413 else :
414414 relationship_key = tuple (
415415 [
416- getattr (self , local .key )
416+ [
417+ getattr (self , k )
418+ for k , column in self .__mapper__ .c .items ()
419+ if local .key == column .key
420+ ][0 ]
417421 for local , _ in relationship .local_remote_pairs
418422 ]
419423 )
You can’t perform that action at this time.
0 commit comments