From 647c14ddef2e4fc9be0b3f8a627a35968d8b4976 Mon Sep 17 00:00:00 2001 From: TheByronHimes Date: Fri, 8 Sep 2023 07:58:59 +0000 Subject: [PATCH] Add return type to SearchParameters validator --- mass/adapters/inbound/fastapi_/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mass/adapters/inbound/fastapi_/models.py b/mass/adapters/inbound/fastapi_/models.py index 88b701f..ee038df 100644 --- a/mass/adapters/inbound/fastapi_/models.py +++ b/mass/adapters/inbound/fastapi_/models.py @@ -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):