Refactor code and update documentation links
This commit is contained in:
parent
f735e50fd2
commit
eef5043045
4 changed files with 59 additions and 63 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue