tickets: 1021
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1021 | 2005-12-07 22:27:19 | 2010-01-05 13:17:13 | 2022-03-06 03:22:15.724932 | Accepted | closed | Validators | defect | major | dev | fixed | [PATCH] unique_together should check the uniqueness in the validation phase | something like this should be in the default framework whenever someone has a 'unique_together' meta option in their model {{{ def _manipulator_validate_name(self, field_data, all_data): from django.core import validators if str(self.__class__) == "django.models.tags.TagManipulatorAdd": cursor= db.cursor() cursor.execute(""" SELECT 1 FROM conf_tags WHERE name=%s and type_id=%s LIMIT 1 """ ,[ all_data['name'], all_data['type'] ]) if cursor.fetchone(): raise validators.ValidationError, "A tag with this name and type already exists." }}} | nobody | Ian@Holsman.net | model-validation | 1 | 1 | 0 | 0 |