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 error preventing widget changes #11498

Merged
merged 6 commits into from
Sep 26, 2024
Merged

Conversation

chiatt
Copy link
Member

@chiatt chiatt commented Sep 26, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Replaced get_or_create because it was taking widget_id as an argument. This worked well for newly created records, but if a record already existed and the widget was being changed to a different widget, this would create a second cardsxnodesxwidget record for the node.

This change reintroduces #9858, however, that error was due in part to making two immediate calls to the CardView endpoint to update the card and permissions trees here. Throttling the second call by 50ms prevents the issue, however, a better long term solution would be to avoid the second call and find a better way of ensuring the trees stay in sync.

Issues Solved

Closes #10899

Checklist

  • I targeted one of these branches:
    • dev/7.6.x (under development): features, bugfixes not covered below
    • dev/7.5.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

@chiatt chiatt changed the title Cnh/10899 change widget bug Fix error preventing widget changes Sep 26, 2024
@chiatt chiatt requested a review from apeters September 26, 2024 11:01
@chiatt chiatt assigned jacobtylerwalls and unassigned apeters Sep 26, 2024
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

+1 tested

@jacobtylerwalls jacobtylerwalls linked an issue Sep 26, 2024 that may be closed by this pull request
@chiatt chiatt merged commit b23ec43 into dev/7.6.x Sep 26, 2024
7 checks passed
@chiatt chiatt deleted the cnh/10899_change_widget_bug branch September 26, 2024 17:36
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.

Cannot change widget template (changes don't persist)
3 participants