Skip to content

Commit

Permalink
Fix last configuration info
Browse files Browse the repository at this point in the history
  • Loading branch information
maricaantonacci committed Oct 11, 2023
1 parent 54aca69 commit 9df21b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/home/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def submit_settings():
username = request.form.get('tosca_templates_username')
deploy_token = request.form.get('tosca_templates_token')

dashboard_configuration_info = {}
serialised_value = redis_client.get("last_configuration_info")
dashboard_configuration_info = json.loads(serialised_value) if serialised_value else {}

if repo_url:
app.logger.debug("Cloning TOSCA templates")
Expand All @@ -65,9 +66,8 @@ def submit_settings():
flash(message1, "success" if ret else "danger")

if ret:
dashboard_configuration_info['tosca_templates_url'] = repo_url
dashboard_configuration_info['tosca_templates_tag_or_branch'] = tag_or_branch

if repo_url: dashboard_configuration_info['tosca_templates_url'] = repo_url
if tag_or_branch: dashboard_configuration_info['tosca_templates_tag_or_branch'] = tag_or_branch

repo_url = request.form.get('dashboard_configuration_url')
tag_or_branch = request.form.get('dashboard_configuration_tag_or_branch')
Expand All @@ -82,8 +82,8 @@ def submit_settings():
private, username, deploy_token)
flash(message2, "success" if ret else "danger")
if ret:
dashboard_configuration_info['dashboard_configuration_url'] = repo_url
dashboard_configuration_info['dashboard_configuration_tag_or_branch'] = tag_or_branch
if repo_url: dashboard_configuration_info['dashboard_configuration_url'] = repo_url
if tag_or_branch: dashboard_configuration_info['dashboard_configuration_tag_or_branch'] = tag_or_branch

tosca.reload()
app.logger.debug("Configuration reloaded")
Expand Down

0 comments on commit 9df21b6

Please sign in to comment.