Opened 9 years ago

Closed 9 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
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: UI/UX:

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)

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

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Alex Dedul

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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