Refactor code and update documentation links

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-06 15:33:42 -03:00
commit eef5043045
4 changed files with 59 additions and 63 deletions

View file

@ -59,9 +59,9 @@ def read_flows(
if auth_settings.AUTO_LOGIN:
flows = session.exec(
select(Flow).where(
(Flow.user_id == None) | (Flow.user_id == current_user.id)
(Flow.user_id == None) | (Flow.user_id == current_user.id) # noqa
)
).all() # noqa
).all()
else:
flows = current_user.flows
@ -71,10 +71,10 @@ def read_flows(
try:
example_flows = session.exec(
select(Flow).where(
Flow.user_id == None,
Flow.folder == STARTER_FOLDER_NAME, # noqa
Flow.user_id == None, # noqa
Flow.folder == STARTER_FOLDER_NAME,
)
).all() # noqa
).all()
for example_flow in example_flows:
if example_flow.id not in flow_ids:
flows.append(example_flow)