🐛 fix(endpoints.py): change get_all function signature to include settings_manager as a dependency to improve code readability

🐛 fix(flows.py): change update_flow function signature to include settings_manager as a dependency to improve code readability
🐛 fix(login.py): change auto_login function signature to include settings_manager as a dependency to improve code readability
🐛 fix(users.py): change add_user function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change read_all_users function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change patch_user function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change delete_user function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change add_super_user_for_testing_purposes_delete_me_before_merge_into_dev function signature to include session as a dependency to improve code readability
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-04 06:41:34 -03:00
commit 2bbbf44b39
4 changed files with 27 additions and 26 deletions

View file

@ -83,6 +83,7 @@ def update_flow(
flow_id: UUID,
flow: FlowUpdate,
current_user: User = Depends(get_current_active_user),
settings_manager=Depends(get_settings_manager),
):
"""Update a flow."""
@ -90,7 +91,6 @@ def update_flow(
if not db_flow:
raise HTTPException(status_code=404, detail="Flow not found")
flow_data = flow.dict(exclude_unset=True)
settings_manager = get_settings_manager()
if settings_manager.settings.REMOVE_API_KEYS:
flow_data = remove_api_keys(flow_data)
for key, value in flow_data.items():