burke-software / django-mass-edit

Make bulk changes in the Django admin interface
152 stars 67 forks source link

Suggestion: check 'unique together' after form submission #29

Closed gamesbook closed 9 years ago

gamesbook commented 9 years ago

mass-edit correctly excludes unique fields from the form before it even gets created. What would be very helpful to prevent potential problems is to add a check to the form after its filled in (but before the change process is run) so that the 'unique_together' property in the model Meta is also validated.

For example, I have a Location type of model. Neither its 'name' or 'region' are individually unique, but the combination has to be. The mass-edit form should throw an error if a user tries to fill in both of those fields at the same time.

gamesbook commented 9 years ago

Was this a poor or inappropriate suggestion?