Opened 5 years ago
Closed 5 years ago
#31277 closed Bug (fixed)
System check fields.E340 should be relaxed when DATABASE_ROUTERS is present.
Reported by: | Xavier Francisco | Owned by: | Xavier Francisco |
---|---|---|---|
Component: | Core (System checks) | Version: | dev |
Severity: | Normal | Keywords: | database-router, manytomany |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hey.
On PR https://github.com/django/django/pull/11630, changes were made to change to allow for multiple models with the same db_name
. Instead of an Error
(models.E028
), a Warning
was created to be used in lieu of it, when DATABASE_ROUTERS
is present.
The same issue arises, with a different check, when using ManyToManyField
, with clashing db_name
s. The system check in question is fields.E340
.
My suggestion would be to do apply the same change for this check, and raise a Warning
instead, whenever DATABASE_ROUTERS
exists.
At this point, the only workaround is silencing the error system check.
Change History (6)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Has patch: | set |
---|
comment:3 by , 5 years ago
Summary: | System check fields.E340 should be relaxed when DATABASE_ROUTERS is present → System check fields.E340 should be relaxed when DATABASE_ROUTERS is present. |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | 3.0 → master |
comment:4 by , 5 years ago
Patch needs improvement: | set |
---|
comment:5 by , 5 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
PR