CRUDKit adjustments and bug fixes.
This commit is contained in:
parent
eef7428c2f
commit
b68dbfc7ae
5 changed files with 26 additions and 13 deletions
|
|
@ -54,6 +54,9 @@ class CRUDService(Generic[T]):
|
|||
def list(self, params=None) -> list[T]:
|
||||
query, root_alias = self.get_query()
|
||||
|
||||
root_fields = []
|
||||
rel_field_names = {}
|
||||
|
||||
if params:
|
||||
if self.supports_soft_delete:
|
||||
include_deleted = _is_truthy(params.get('include_deleted'))
|
||||
|
|
@ -73,7 +76,8 @@ class CRUDService(Generic[T]):
|
|||
isouter=True
|
||||
)
|
||||
|
||||
root_fields, rel_field_names = spec.parse_fields()
|
||||
if params:
|
||||
root_fields, rel_field_names = spec.parse_fields()
|
||||
|
||||
if root_fields:
|
||||
query = query.options(Load(root_alias).load_only(*root_fields))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue