Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controllers/tour: Reset unspecified fields to DB default #776 #814

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

lentinj
Copy link
Collaborator

@lentinj lentinj commented Apr 23, 2024

If a value is unspecified, update_or_insert() will leave alone on update. We want missing values to go back to their default, as they would have done if they weren't specified in the first place.

Add the database defaults at the start of merging the tourstop dict, so this happens. Add some missing defaults for non-null fields so we merge the right values.

Fixes #776

If a value is unspecified, update_or_insert() will leave alone on
update. We want missing values to go back to their default, as they
would have done if they weren't specified in the first place.

Add the database defaults at the start of merging the tourstop dict, so
this happens. Add some missing defaults for non-null fields so we merge
the right values.
@lentinj lentinj merged commit c0db0c0 into main Apr 23, 2024
1 check passed
@lentinj lentinj deleted the issue-776-clear-old-values branch April 23, 2024 10:37
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.

Clearing previously set tourstop values (qs_opts)
1 participant