add missing unique_together on graph descriptions
This commit is contained in:
parent
153c20410c
commit
fe7faaff58
2 changed files with 29 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.7 on 2017-12-19 00:59
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mapdata', '0062_typos'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='crossdescription',
|
||||||
|
unique_together=set([('space', 'origin_space', 'target_space')]),
|
||||||
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='leavedescription',
|
||||||
|
unique_together=set([('space', 'target_space')]),
|
||||||
|
),
|
||||||
|
]
|
|
@ -256,6 +256,9 @@ class LeaveDescription(models.Model):
|
||||||
verbose_name = _('Leave description')
|
verbose_name = _('Leave description')
|
||||||
verbose_name_plural = _('Leave descriptions')
|
verbose_name_plural = _('Leave descriptions')
|
||||||
default_related_name = 'leave_descriptions'
|
default_related_name = 'leave_descriptions'
|
||||||
|
unique_together = (
|
||||||
|
('space', 'target_space')
|
||||||
|
)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def title(self):
|
def title(self):
|
||||||
|
@ -277,6 +280,9 @@ class CrossDescription(models.Model):
|
||||||
verbose_name = _('Cross description')
|
verbose_name = _('Cross description')
|
||||||
verbose_name_plural = _('Cross descriptions')
|
verbose_name_plural = _('Cross descriptions')
|
||||||
default_related_name = 'cross_descriptions'
|
default_related_name = 'cross_descriptions'
|
||||||
|
unique_together = (
|
||||||
|
('space', 'origin_space', 'target_space')
|
||||||
|
)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def title(self):
|
def title(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue