-
Notifications
You must be signed in to change notification settings - Fork 44
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: Infinite loop when updating one-one relation #1915
fix: Infinite loop when updating one-one relation #1915
Conversation
If the relationship references the same (host) collection, the function would in some circumstances return the known field. In collection.save, when updating via a secondary one-one field this leads to an infinite loop.
c4f84dc
to
5eb4343
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers for sorting
Codecov ReportAll modified lines are covered by tests ✅
@@ Coverage Diff @@
## develop #1915 +/- ##
===========================================
+ Coverage 70.80% 70.84% +0.04%
===========================================
Files 233 233
Lines 24322 24334 +12
===========================================
+ Hits 17220 17238 +18
+ Misses 5930 5926 -4
+ Partials 1172 1170 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
## Relevant issue(s) Resolves #1914 ## Description Fixes an a bug where an infinite loop may be created when updating a self-referencing one-one relation from the secondary side.
## Relevant issue(s) Resolves sourcenetwork#1914 ## Description Fixes an a bug where an infinite loop may be created when updating a self-referencing one-one relation from the secondary side.
Relevant issue(s)
Resolves #1914
Description
Fixes an a bug where an infinite loop may be created when updating a self-referencing one-one relation from the secondary side.
The first commit documents the bug, the second commit fixes it.