[PR #18162] [MERGED] Fixes #17810: Disable DRF's native unique constraint checks #15283

Closed
opened 2025-12-30 00:21:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18162
Author: @jeremystretch
Created: 12/5/2024
Status: Merged
Merged: 12/5/2024
Merged by: @jeremystretch

Base: developHead: 17810-serializer-unique-constraints


📝 Commits (1)

  • ca94218 Fixes #17810: Disable DRF's native unique constraint checks

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 netbox/netbox/api/serializers/base.py (+6 -0)

📄 Description

Fixes: #17810

Submitted as an alternate to PR #18108. This disabled DRF's unique constraint checks, which appear to be faulty (see encode/django-rest-framework/issues/9410).

ValidatedModelSerializer calls full_clean() on its associated instance, so the uniqueness checks should be redundant.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/18162 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/5/2024 **Status:** ✅ Merged **Merged:** 12/5/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `17810-serializer-unique-constraints` --- ### 📝 Commits (1) - [`ca94218`](https://github.com/netbox-community/netbox/commit/ca9421847871120e3275263057cb37958a9ce537) Fixes #17810: Disable DRF's native unique constraint checks ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/api/serializers/base.py` (+6 -0) </details> ### 📄 Description ### Fixes: #17810 Submitted as an alternate to PR #18108. This disabled DRF's unique constraint checks, which appear to be faulty (see encode/django-rest-framework/issues/9410). ValidatedModelSerializer calls `full_clean()` on its associated instance, so the uniqueness checks should be redundant. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:21:03 +01:00
adam closed this issue 2025-12-30 00:21:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15283