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

Check if referenced node is already published before publishing again #3902

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

jastraat
Copy link
Contributor

@jastraat jastraat commented Feb 3, 2023

Every time a dataset or data dictionary is saved, all its references (themes, tags, etc) are checked. If they do not exist, they are created. If they do exist, they are set to published and resaved. This creates a new revision of every associated data node every time the dataset is saved.

This logic executed even if the theme/tag/etc was already published. This PR merely reduces the amount of additional node saves by only publishing/saving if the referenced node is unpublished.

@jastraat jastraat requested a review from janette February 3, 2023 14:10
@janette janette force-pushed the check-node-not-published branch from c13a563 to c7801e6 Compare February 7, 2023 17:35
@janette janette merged commit c8a585b into 2.x Feb 8, 2023
@janette janette deleted the check-node-not-published branch February 8, 2023 20:05
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