Opened 13 years ago

Closed 13 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


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)

syncdb_ordering_fields.patch (518 bytes) - added by Alex Dedul 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Alex Dedul

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [3095]) Fixed #2098 -- Loosened validation for model 'ordering' parameter by allowing periods. Thanks, Alex Dedul

Note: See TracTickets for help on using tickets.
Back to Top