Skip to content

[bug] Handle duplicate email addresses for magic links - #12621

Merged
SchrodingersGat merged 1 commit into
inventree:masterfrom
SchrodingersGat:magic-link-fix
Aug 11, 2026
Merged

SchrodingersGat merged 1 commit into
inventree:masterfrom
SchrodingersGat:magic-link-fix

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

If multiple users exist with the same email, do not generate magic link emails

@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Aug 11, 2026
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed backport Apply this label to a PR to enable auto-backport action backport-to-1.5.x labels Aug 11, 2026
@netlify

netlify Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 28c013d
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a7b1c8f76a754000853e0ee

@codecov

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.71%. Comparing base (7a935f6) to head (28c013d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12621      +/-   ##
==========================================
- Coverage   86.72%   86.71%   -0.01%     
==========================================
  Files        1447     1447              
  Lines       96780    96790      +10     
  Branches    11262    11262              
==========================================
+ Hits        83933    83935       +2     
- Misses      12783    12791       +8     
  Partials       64       64              
Flag Coverage Δ
backend 90.77% <100.00%> (-0.02%) ⬇️

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

Components Coverage Δ
Backend Apps 92.14% <ø> (-0.01%) ⬇️
Backend General 93.53% <ø> (-0.04%) ⬇️
Frontend 79.56% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat merged commit 77d8470 into inventree:master Aug 11, 2026
45 checks passed
@SchrodingersGat
SchrodingersGat deleted the magic-link-fix branch August 11, 2026 13:49
except User.DoesNotExist:
return None
except User.MultipleObjectsReturned:
logger.warning('Multiple users found with email: %s', email)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Imo this should be a raised error, not just a log

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Raise to the user, or log error to the DB?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think it woul be prudent to raise it to the user

@github-actions

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 1.5.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat added a commit that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Apply this label to a PR to enable auto-backport action backport-to-1.5.x bug Identifies a bug which needs to be addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants