Skip to content

Commit 7aba21f

Browse files
[FIX] Revert djangorestframework 3.15.2 → 3.14.0 to avoid UniqueTogetherValidator errors (#2098)
[FIX] Revert djangorestframework 3.15.2 -> 3.14.0 to unblock staging The DRF 3.15.2 bump (#2087) regressed rc.343. DRF 3.15 auto-derives multi-field UniqueTogetherValidators from model UniqueConstraints, which 3.14 only did for legacy unique_together. Two breakages followed for every ModelSerializer(fields="__all__") over a model using Meta.constraints: 1. Server-set constraint fields (e.g. organization) -> "<field>: required" on create. Partially patched by #2092 for the 5 org-attached models. 2. Client-supplied constraint fields (TableSettings, ProfileManager, agentic table settings, lookups) -> "...must make a unique set" raised at is_valid(), short-circuiting the views' intended `except IntegrityError: raise DuplicateData(<friendly>)` path. This both replaced the friendly message and moved the error from a top-level `detail` string into nested `non_field_errors`, which the frontend does not surface -> silent failures (e.g. duplicate LLM profile name, table settings no longer editable after first save). Pin back to 3.14.0 to restore the known-good behaviour across the whole unique-constraint class at once. The CVE-2024-21520 XSS patch carried by 3.15.2 is intentionally deprioritized; the 3.15 upgrade will be reattempted later with a serializer-level fix (drop auto-derived uniqueness validators). Reverts only the DRF entry from #2087; other batched bumps untouched. The org `editable=False` changes (#2092) remain correct no-ops under 3.14 (org is set server-side in save() from UserContext), so no rollback is needed there. Claude-Session: https://claude.ai/code/session_01G8hAHc4HUo42zY1g9LAjKu Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent de49f06 commit 7aba21f

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies = [
1919
"cron-descriptor==1.4.0", # For cron string description
2020
"cryptography>=48.0.1",
2121
"django==4.2.30",
22-
"djangorestframework==3.15.2",
22+
"djangorestframework==3.14.0",
2323
"django-cors-headers==4.3.1",
2424
# Pinning django-celery-beat to avoid build issues
2525
"django-celery-beat==2.5.0",

backend/uv.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ hook-check-django-migrations = [
4545
"celery>=5.3.4",
4646
"cron-descriptor==1.4.0",
4747
"django==4.2.30",
48-
"djangorestframework==3.15.2",
48+
"djangorestframework==3.14.0",
4949
# Pinning django-celery-beat to avoid build issues
5050
"django-celery-beat==2.5.0",
5151
"django-cors-headers>=4.3.1",

uv.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)