Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#2194 closed defect (fixed)

[patch] Minor inconsistency in "unique together" validation error message

Reported by: amcnabb@… Owned by: adrian
Component: contrib.admin Version:
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Two of the fields in a model are 'prefname' and 'mrn'. The long name of 'prefname' is 'Preferred Name' and the long name of 'mrn' is 'Member Record Number'. I noticed a minor inconsistency when I added unique_together = (('prefname', 'mrn'),) to the Meta class of the model.

When I add two records that are not unique together, I get the error 'Person with this Preferred Name already exists for the given mrn.' This is great, except that the long name is given for one of the fields but not the other. It would be preferrable if the error read, 'Person with this Preferred Name already exists for the given Member Record Number'.

Like I said, it's very minor.

Attachments (1)

django-unique-together-error.diff (890 bytes) - added by dackze+django@… 9 years ago.
Makes validator use only verbose names in this error message

Download all attachments as: .zip

Change History (4)

comment:1 Changed 9 years ago by adrian

  • Summary changed from very minor inconsistency in admin interface to Minor inconsistency in "unique together" validation error message

Changed 9 years ago by dackze+django@…

Makes validator use only verbose names in this error message

comment:2 Changed 9 years ago by dackze+django@…

  • Summary changed from Minor inconsistency in "unique together" validation error message to [patch] Minor inconsistency in "unique together" validation error message

comment:3 Changed 9 years ago by mtredinnick

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

Fixed in r3854.

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