From a4401d871c6ac421bd0eef9d2b7f06a8b054bf91 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 29 Nov 2021 07:30:51 +0530 Subject: [PATCH] Handle if keyword's mother is None --- app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index 4468742..bc09532 100644 --- a/app/models.py +++ b/app/models.py @@ -485,7 +485,7 @@ class Keyword(models.Model): keyword = models.TextField(blank=True, null=True) def __str__(self): - return '%s > %s' % (self.mother, self.keyword) + return '%s > %s' % (self.mother, self.keyword) if self.mother else self.keyword class ResourceKeyword(models.Model):