-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Revert Unique Together Checking Regression #9483
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi max, did you check this PR #9482? instead of editing should you accept that? |
auvipy
requested changes
Aug 5, 2024
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.
I think we can leave this in favor of the newly merged one
Great, glad to see that got in! Closing this out. |
terjekv
added a commit
to terjekv/mreg
that referenced
this pull request
Aug 7, 2024
- We are stuck on drf 3.14.0 due to encode/django-rest-framework#9358 until encode/django-rest-framework#9483 goes into prod, hopefully 3.15.3.
This was referenced Aug 7, 2024
oyvindhagberg
pushed a commit
to unioslo/mreg
that referenced
this pull request
Aug 22, 2024
* Add query string to logging output. * Type checking fix (type->isinstance) * Fix filters for Mreg (HostPolicy outstanding). * Safer version of JSON filter to avoid SQL injections. * Refactor, cleanup. * Hostpolicy filter "fixes", also bump dependencies. - We are stuck on drf 3.14.0 due to encode/django-rest-framework#9358 until encode/django-rest-framework#9483 goes into prod, hopefully 3.15.3. * Skeleton for testing filters. * Add iexact support, add cases. Fix toml. * Move to ruff formater. * More tests. - Add ip support. - Add reverse lookups. * Hostpolicy filter tests. - Also reformat as per ruff. * Add a test for filtering on ?id= for hosts. - This should catch the generic issue of filtering on IDs. Ideally we'd do this for every model that supports ID... * support `__in`. * Support CIDR matching. - Match exact CIDR or IP within a CIDR.
gergosimonyi
added a commit
to goauthentik/authentik
that referenced
this pull request
Apr 14, 2025
upgrade `django-rest-framework` to `3.16.0` The reverted commit is purely an optimization which unfortunately breaks authentik, specifically Blueprints. It adds `getattr(serializer.instance, field)` to a validator. If `field` is a `RelatedObject`, that invocation queries the database. When authentik creates objects using Blueprints, it doesn't place related objects into the database before the validator tries to get them from there, so with the reverted commit, it produces `RelatedObjectDoesNotExist`. Perhaps a long-term solution is to revise how Blueprints work, or perhaps it is to change upstream. But in the meantime, Django 5.0 support ended and upgrading to Django 5.1 requires an upgrade of `django-rest-framework` to `3.16.0`, hence this workaround. See - encode/django-rest-framework#9154 - encode/django-rest-framework#9358 - encode/django-rest-framework#9482 - encode/django-rest-framework#9483
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Revert the changes in #9154 that are leading to a regression where existing data in
initial_data
is ignored, where a uniqueness constraint might be incorrectly validated against, as described in #9358.