From 8aae6eccd4eb7a138ff0bdaafd1af2bf8eec5b4e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 13 Aug 2017 09:14:11 +0200 Subject: Models: change relation type to manage self relation on virtual class --- ishtar_common/models.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index b3fba3b1f..c2f75aba3 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1066,10 +1066,9 @@ class GeneralRelationType(GeneralType): symmetrical = models.BooleanField(_(u"Symmetrical")) tiny_label = models.CharField(_(u"Tiny label"), max_length=50, blank=True, null=True) - # # an inverse must be set - # inverse_relation = models.ForeignKey( - # 'RelationType', verbose_name=_(u"Inverse relation"), blank=True, - # null=True) + inverse_relation = models.ForeignKey( + 'self', verbose_name=_(u"Inverse relation"), blank=True, + null=True) class Meta: abstract = True -- cgit v1.2.3