|
@@ -43,16 +43,15 @@ class LogList(Resource):
|
|
|
stmt = select(Log)
|
|
|
|
|
|
if module:
|
|
|
- stmt.where(Log.module == module)
|
|
|
+ stmt = stmt.where(Log.module == module)
|
|
|
if name:
|
|
|
- stmt.where(Log.operation_staff == name)
|
|
|
+ stmt = stmt.where(Log.operation_staff == name)
|
|
|
if operation_type:
|
|
|
- stmt.where(Log.operation_type == operation_type)
|
|
|
+ stmt = stmt.where(Log.operation_type == operation_type)
|
|
|
if operation_status:
|
|
|
- stmt.where(Log.operation_status == operation_status)
|
|
|
-
|
|
|
- stmt.offset(page_size * (page - 1)).limit(page_size)
|
|
|
+ stmt = stmt.where(Log.operation_status == operation_status)
|
|
|
|
|
|
+ stmt = stmt.offset(page_size * (page - 1)).limit(page_size)
|
|
|
results = session.execute(stmt).scalars().all()
|
|
|
|
|
|
save_log(request, Module.LOG, OperationType.INQUIRE, StatesCode.SUCCESS)
|