search full_name continue

This commit is contained in:
dderbentsov
2023-10-03 00:20:06 +03:00
parent a2dd4b36c2
commit 936d3b0af8
2 changed files with 31 additions and 3 deletions

View File

@@ -55,7 +55,5 @@ class PersonService(BaseService[Person, PersonCreate, Any]):
full_name = str(query_params.full_name).lower()
if full_name == '':
return []
objs: List[Person] = self.db_session.query(Person).filter(Person.last_name.contains(full_name)).all()
print(len(objs))
objs: List[Person] = self.db_session.query(Person).filter(Person.full_name.contains(full_name)).all()
return objs