From 95037e04ba060fe5a9fea32fd8dc613b87c238b7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 23 Apr 2018 16:33:11 +0200 Subject: Area: fix on delete parent (SET NULL) --- ishtar_common/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c14635a51..ccbe486e0 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3186,7 +3186,8 @@ class Area(HierarchicalType): related_name='areas') parent = models.ForeignKey( 'self', blank=True, null=True, verbose_name=_(u"Parent"), - help_text=_(u"Only four level of parent are managed.") + help_text=_(u"Only four level of parent are managed."), + related_name='children', on_delete=models.SET_NULL ) class Meta: -- cgit v1.2.3