Skip to content

fix: Avoid errors when missing subscription information cache id#3380

Merged
zachaysan merged 2 commits intomainfrom
fix/avoid_errors_when_missing_cache
Feb 6, 2024
Merged

fix: Avoid errors when missing subscription information cache id#3380
zachaysan merged 2 commits intomainfrom
fix/avoid_errors_when_missing_cache

Conversation

@zachaysan
Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

A Sentry issue alerted the ability of an unset subscription information cache id during an organisational delete. This code simply checks the presence of the model in question and does not delete it if the id is not present.

Though only three occurrences at the time of this writing have happened, it's not clear as to how the application got into the state where an model is set without an id.

How did you test this code?

I am going to rely on CI since the change is very simple.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2024 3:33pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2024 3:33pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2024 3:33pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2024

Uffizzi Preview deployment-45866 was deleted.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 5, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (16e6a28) 95.93% compared to head (9415c63) 36.42%.
Report is 5 commits behind head on main.

❗ Current head 9415c63 differs from pull request most recent head ce6626b. Consider uploading reports for the commit ce6626b to get more accurate results

Files Patch % Lines
api/organisations/models.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3380       +/-   ##
===========================================
- Coverage   95.93%   36.42%   -59.52%     
===========================================
  Files        1077     1003       -74     
  Lines       32944    29008     -3936     
===========================================
- Hits        31606    10565    -21041     
- Misses       1338    18443    +17105     

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

@zachaysan zachaysan added this pull request to the merge queue Feb 6, 2024
Merged via the queue into main with commit d9a835f Feb 6, 2024
@zachaysan zachaysan deleted the fix/avoid_errors_when_missing_cache branch February 6, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants