Remove some comments.
This commit is contained in:
parent
506713c748
commit
013d1c0bd5
1 changed files with 0 additions and 17 deletions
|
|
@ -85,9 +85,6 @@ class CRUDService(Generic[T]):
|
||||||
for eager in spec.get_eager_loads(root_alias, fields_map=rel_field_names):
|
for eager in spec.get_eager_loads(root_alias, fields_map=rel_field_names):
|
||||||
query = query.options(eager)
|
query = query.options(eager)
|
||||||
|
|
||||||
# if root_fields or rel_field_names:
|
|
||||||
# query = query.options(Load(root_alias).raiseload("*"))
|
|
||||||
|
|
||||||
if filters:
|
if filters:
|
||||||
query = query.filter(*filters)
|
query = query.filter(*filters)
|
||||||
|
|
||||||
|
|
@ -125,20 +122,6 @@ class CRUDService(Generic[T]):
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# try:
|
|
||||||
# rf_names = [c.key for c in (root_fields or [])]
|
|
||||||
# except NameError:
|
|
||||||
# rf_names = []
|
|
||||||
# if rf_names:
|
|
||||||
# allow = set(rf_names)
|
|
||||||
# if "id" not in allow and hasattr(self.model, "id"):
|
|
||||||
# allow.add("id")
|
|
||||||
# for obj in rows:
|
|
||||||
# try:
|
|
||||||
# setattr(obj, "__crudkit_root_fields__", allow)
|
|
||||||
# except Exception:
|
|
||||||
# pass
|
|
||||||
|
|
||||||
return rows
|
return rows
|
||||||
|
|
||||||
def create(self, data: dict, actor=None) -> T:
|
def create(self, data: dict, actor=None) -> T:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue