Skip to content

Commit

Permalink
fix flat_dependencies
Browse files Browse the repository at this point in the history
Lancetnik committed Jun 6, 2023
1 parent 148752f commit d2a31d1
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fast_depends/__about__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""FastDepends - extracted and cleared from HTTP domain Fastapi Dependency Injection System"""

__version__ = "1.1.6"
__version__ = "1.1.7"
4 changes: 3 additions & 1 deletion fast_depends/model.py
Original file line number Diff line number Diff line change
@@ -52,10 +52,12 @@ def flat_params(self) -> List[ModelField]:
for d in self.dependencies:
params.extend(d.flat_params)

params_unique_names = set()
params_unique = []
for p in params:
if p not in params_unique:
if p.name not in params_unique_names:
params_unique.append(p)
params_unique_names.add(p.name)

return params_unique

0 comments on commit d2a31d1

Please sign in to comment.