mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
Adjusted files for isort & autopep
This commit is contained in:
committed by
github-actions[bot]
parent
badf2b157f
commit
7afb8e2fd8
@@ -60,8 +60,7 @@ def get_object_or_404(
|
||||
if hasattr(row, "_mapping"):
|
||||
obj_dict = dict(row._mapping)
|
||||
else:
|
||||
obj_dict = {column.key: getattr(row, column.key)
|
||||
for column in selected_columns}
|
||||
obj_dict = {column.key: getattr(row, column.key) for column in selected_columns}
|
||||
else:
|
||||
query = select(db_class).where(getattr(db_class, lookup_column) == id)
|
||||
result = await db.execute(query)
|
||||
|
||||
@@ -12,7 +12,7 @@ class ResponseModelDependency:
|
||||
def process_result(result, fields=None, async_session=False):
|
||||
if not fields:
|
||||
if async_session:
|
||||
return {k: v for k, v in result.__dict__.items() if not k.startswith('_')}
|
||||
return {k: v for k, v in result.__dict__.items() if not k.startswith("_")}
|
||||
return result
|
||||
|
||||
if hasattr(result, "_fields"):
|
||||
|
||||
Reference in New Issue
Block a user