Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14513 closed (fixed)

Ordering Check in django/core/management/

Reported by: Klaas van Schelven Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


django/core/management/, both in the current trunk and in 1.2.3
It says in the accompanying comment:

# Skip ordering in the format field1__field2 (FIXME: checking 
# this format would be nice, but it's a little fiddly). 

However, the actual check is for only one "_". Which leads fieldnames which contain underscores to not be checked for

The patch would be something like this:

<                 if '__' in field_name: 
>                 if '_' in field_name: 

I will go through some hoops to put up an actual patch here.

Attachments (1)

django-14513-e62b9ba4e02c.diff (2.0 KB) - added by Klaas van Schelven 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Klaas van Schelven


comment:2 Changed 8 years ago by Łukasz Rekucki

Component: UncategorizedDatabase layer (models, ORM)
Triage Stage: UnreviewedReady for checkin

Tested, looks simple, marking for checkin.

comment:3 Changed 8 years ago by Alex Gaynor

Resolution: fixed
Status: newclosed

Fixed in [14315].

comment:4 Changed 8 years ago by Chris Beaven

(In [14317]) [1.2.X] Fixed #14513 -- check fields with underscores for validity when ordering. Bonus points to Klaas van Schelven.

Backport from trunk (r14315)

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