Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

UI: fix config var renaming #2421

Merged
merged 3 commits into from
Oct 6, 2021
Merged

UI: fix config var renaming #2421

merged 3 commits into from
Oct 6, 2021

Conversation

gregone
Copy link
Contributor

@gregone gregone commented Oct 5, 2021

Fixes #2339

Because the API does an upsert for config vars, and unicity is enforced via variable names, renaming a variable would cause the creation of a new variable. This PR adds logic to compare the updated variable name with the original one, and deletes the initial variable after save if the name has been changed.

@gregone gregone requested a review from a team October 5, 2021 14:55
Copy link
Contributor

@sabrinako sabrinako left a comment

Choose a reason for hiding this comment

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

Looks good to me! 👍

@jgwhite
Copy link
Contributor

jgwhite commented Oct 6, 2021

This PR taught me the word “unicity”! Thank you!

@gregone gregone merged commit 54d7725 into main Oct 6, 2021
@gregone gregone deleted the ui/bugfix-config-var-rename branch October 6, 2021 09:57
izaaklauer pushed a commit that referenced this pull request Oct 8, 2021
* delete renamed var after edition
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui: Renaming a config variable does not remove the original
3 participants