Handle if keyword's mother is None

This commit is contained in:
PCoder 2021-11-29 07:30:51 +05:30
parent 7f2c9693a6
commit a4401d871c

View file

@ -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):