Skip to content

Commit

Permalink
Add return type to SearchParameters validator
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed Sep 8, 2023
1 parent 996f035 commit 647c14d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mass/adapters/inbound/fastapi_/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class SearchParameters(BaseModel):

@validator("sorting_parameters")
@classmethod
def no_duplicate_fields(cls, parameters: list[SortingParameter]):
def no_duplicate_fields(
cls, parameters: list[SortingParameter]
) -> list[SortingParameter]:
"""Check for duplicate fields in sorting parameters"""
all_sort_fields = [param.field for param in parameters]
if len(set(all_sort_fields)) < len(all_sort_fields):
Expand Down

0 comments on commit 647c14d

Please sign in to comment.