Skip to content

configuration, admin: ConfigurationVariable improvements (bug 2011883)#869

Draft
zzzeid wants to merge 1 commit intomainfrom
zeid/bug-2011883-basic-cleaning-json-cv
Draft

configuration, admin: ConfigurationVariable improvements (bug 2011883)#869
zzzeid wants to merge 1 commit intomainfrom
zeid/bug-2011883-basic-cleaning-json-cv

Conversation

@zzzeid
Copy link
Copy Markdown
Contributor

@zzzeid zzzeid commented Jan 23, 2026

  • use ConfigurationVariable.set when saving via the admin
  • do a round-trip json dumps/loads to remove duplicate keys and validate

@github-actions
Copy link
Copy Markdown

View this pull request in Lando to land it once approved.

@zzzeid zzzeid changed the title configuration: use CV API when saving values (bug 2011883) configuration, admin: ConfigurationVariable improvements (bug 2011883) Jan 23, 2026
Comment thread src/lando/main/admin.py
):
# Use the existing ConfigurationVariable API to ensure field is
# set and cleaned correctly.
ConfigurationVariable.set(**form.cleaned_data)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you cast the key value to a ConfigurationKey here you can avoid most of the key_value related changes, since you won't need to support arbitrary str inputs. This would also avoid issues with typos on expected key values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants