Opened 20 years ago
Closed 20 years ago
#2098 closed defect (fixed)
[patch] syncdb fails if models contain ordering fields in format "table.field"
| Reported by: | Alex Dedul | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
For example with ordering = ('auth_user.username', ) when syncdb is run you get the following error
Error: None couldn't be installed, because there were errors in your model: intranet.userprofile: "ordering" refers to "auth_user.username", a field that doesn't exist.
Patch below fixes this by skipping ordering fields that contains dot.
Attachments (1)
Change History (2)
by , 20 years ago
| Attachment: | syncdb_ordering_fields.patch added |
|---|
comment:1 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [3095]) Fixed #2098 -- Loosened validation for model 'ordering' parameter by allowing periods. Thanks, Alex Dedul