Opened 9 years ago

Closed 9 years ago

#4639 closed (duplicate)

unique_together and edit_inline, IntegrityError instead of suitable error message

Reported by: Reza Mohammadi <reza@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: 0.96
Severity: Keywords:
Cc: jshaffer2112@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



class TranslatableString(models.Model):
    title = models.CharField(_('Title'), maxlength=200)
    class Admin:
class TranslationString(models.Model):
    main = models.ForeignKey(TranslatableString,verbose_name=_("Translation of string"),
    lang = models.ForeignKey(Language, core=True)
    translation = models.CharField(_('Translation'), maxlength=200)

I'm adding/editing TranslatableString, and when I enter two TranslationStrings with same lang,
I see this server error:

IntegrityError at /admin/i18n/translatablestring/1/

columns main_id, lang_id are not unique

But I excepted some suitable error message in red!

Change History (3)

comment:1 Changed 9 years ago by John Shaffer <jshaffer2112@…>

Cc: jshaffer2112@… added
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 9 years ago by Simon G. <dev@…>

Duplicate of #565

comment:3 Changed 9 years ago by Brian Rosner <brosner@…>

Resolution: duplicate
Status: newclosed

Simon, I believe you meant to close this. I am closing it now.

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