#2194 closed defect (fixed)
[patch] Minor inconsistency in "unique together" validation error message
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
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: | no | UI/UX: | no |
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)
Change History (4)
comment:1 by , 18 years ago
Summary: | very minor inconsistency in admin interface → Minor inconsistency in "unique together" validation error message |
---|
by , 18 years ago
Attachment: | django-unique-together-error.diff added |
---|
comment:2 by , 18 years ago
Summary: | Minor inconsistency in "unique together" validation error message → [patch] Minor inconsistency in "unique together" validation error message |
---|
Makes validator use only verbose names in this error message