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

KMS-516: Fixed update to delete first, then update. #13

Merged
merged 5 commits into from
Feb 14, 2025
Merged

Conversation

cgokey
Copy link
Contributor

@cgokey cgokey commented Feb 14, 2025

Overview

There was a bug in the update, where if a user wanted to update a concept, it didn't delete the old concept first. As a result, duplicate fields were encountered.

What is the Solution?

I changed the logic to delete first, if there was an error in the delete, I also created a rollback function that will rollback the deleted triples (best I can do without transactions).

What areas of the application does this impact?

Updating SKOS concepts

Testing

Try creating a SKOS concept, then updating it where the updated version does not have some fields. Those fields should disappear when you try fetching the concept again.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.15%. Comparing base (e382742) to head (6e4d5ad).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   98.98%   99.15%   +0.16%     
==========================================
  Files          22       25       +3     
  Lines         297      353      +56     
  Branches       56       71      +15     
==========================================
+ Hits          294      350      +56     
  Misses          3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Christopher Gokey added 2 commits February 14, 2025 12:44
@cgokey cgokey merged commit 2c6bf16 into main Feb 14, 2025
4 checks passed
@cgokey cgokey deleted the KMS-516b branch February 14, 2025 19:32
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.

4 participants