mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
audit: api signature
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -90,8 +90,9 @@ def get_cmd_flags():
|
||||
return vars(shared.cmd_opts)
|
||||
|
||||
def get_history(req: models.ReqHistory = Depends()):
|
||||
if req.id is not None and len(req.id) > 0:
|
||||
res = [item for item in shared.state.state_history if item['id'] == req.id]
|
||||
if req.id is not None and (isinstance(req.id, str) and len(req.id) > 0 or isinstance(req.id, int)):
|
||||
id = str(req.id) if isinstance(req.id, int) else req.id
|
||||
res = [item for item in shared.state.state_history if item['id'] == id]
|
||||
else:
|
||||
res = shared.state.state_history
|
||||
res = [models.ResHistory(**item) for item in res]
|
||||
|
||||
Reference in New Issue
Block a user