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

Improve DB efficiency for user settings #6996

Merged

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Apr 10, 2024

  • Prefetch related user
  • Prevents 1+N issue

Before

image

After

image

- Prefetch related user
- Prevents 1+N issue
@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature api Relates to the API refactor labels Apr 10, 2024
@SchrodingersGat SchrodingersGat added this to the 0.15.0 milestone Apr 10, 2024
Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit c46e6dc
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/661723171ecef20008aed3ce

@matmair
Copy link
Contributor

matmair commented Apr 10, 2024

Very nice! In theory we/you should get alerts about these kinds of errors in sentry - do they show up there?

@SchrodingersGat
Copy link
Member Author

I haven't seen sentry reporting anything like this.

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.25%. Comparing base (1e0382c) to head (c46e6dc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6996   +/-   ##
=======================================
  Coverage   84.24%   84.25%           
=======================================
  Files         875      875           
  Lines       40863    40867    +4     
  Branches      284      284           
=======================================
+ Hits        34426    34431    +5     
+ Misses       6364     6363    -1     
  Partials       73       73           
Flag Coverage Δ
backend 85.44% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@SchrodingersGat SchrodingersGat merged commit f61259e into inventree:master Apr 11, 2024
31 checks passed
@SchrodingersGat SchrodingersGat deleted the user-settings-api-fix branch April 11, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Relates to the API enhancement This is an suggested enhancement or new feature refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants