Added child to str representation of self-referential model.
parent
c855ad8be3
commit
bcd328a101
|
|
@ -149,4 +149,6 @@ class SelfReferentialCategory(SimpleModel, Sortable):
|
|||
child = SortableForeignKey('self', blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
if self.child:
|
||||
return '{} - {}'.format(self.child, self.title)
|
||||
return self.title
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue