Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#699 closed defect (invalid)

unique_together - raise an error message

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

Description

unique_together should raise an error message, instead of show:

There's been an error:

Traceback (most recent call last):

...
...
...

OperationalError: columns foo, bar are not unique

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by adrian

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

unique_together raises an appropriate ValidationError in the admin, or when you use the manipulator directly. No validation is performed when you create objects manually using the API and save() method.

comment:2 Changed 8 years ago by BleSS

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I know that validation isn't performed when objects are created manually.

In the admin, unique_together didn't raise the ValidationError.

comment:3 Changed 8 years ago by adrian

  • Resolution set to invalid
  • Status changed from reopened to closed

Reopen if you have more information.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.