PostalCode unique key contais id + othee fields
ihor-nahuliak opened this issue · 0 comments
ihor-nahuliak commented
Postal code mode has strange unique keys:
https://github.com/coderholic/django-cities/blob/master/cities/models.py#L347
@python_2_unicode_compatible
class PostalCode(Place, SlugModel):
# ...
class Meta:
unique_together = (
('country', 'region', 'subregion', 'city', 'district', 'name', 'id', 'code'),
('country', 'region_name', 'subregion_name', 'district_name', 'name', 'id', 'code'),
)
Id field is already unique as primary key. What is the sense of these 2 unique keys above?