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

Fix allowance for emptying tags for a given resource/organisation when editing it #1638

Open
joseAyudarte91 opened this issue Oct 10, 2023 · 0 comments
Assignees

Comments

@joseAyudarte91
Copy link
Contributor

There are 2 separated issues:

  • Right now there is a bug emptying all the tags when using either Resource Details PUT endpoint or any of the Organisations-related PUT endpoints, since the backend thinks those will not be updated.
    So, we need to allow that use-case by checking if the front-end is providing the tags key during the resource/organisation update, so all the tag relationships are removed in case of receiving either a null or empty array ([]) value.

  • The other issue is front-end related, since it is not sending tags property at all whenever the user tries to remove all of them, so the backend will never know whether those tag relationships need to be removed or not. Hence, the behaviour needs to be as described in the point above.
    This problem has been detected at least for the editon of events.

@joseAyudarte91 joseAyudarte91 self-assigned this Oct 10, 2023
joseAyudarte91 added a commit that referenced this issue Oct 10, 2023
[Re #1638]

As described in the issue, now we check in the affected API endpoints
whether we get the `tags` key at all in the payload, so we know if we
need to remove all the tag relationships, add/remove some of them or we
just ignore tags during the update (in case we do not receive such
property at all).

We have needed to update the generic tag update code to allow this
use-case.
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

No branches or pull requests

1 participant