django_rbac: fix ContentType.__str__ variations (#64305)
This commit is contained in:
parent
503a983320
commit
9b0ac49118
|
@ -165,7 +165,7 @@ class PermissionAbstractBase(models.Model):
|
|||
target = ContentType.objects.get_for_id(self.target_id)
|
||||
s = f'{self.operation} / {target}'
|
||||
else:
|
||||
s = f'{self.operation} / {ct} / {self.target}'
|
||||
s = f'{self.operation} / {ct.name} / {self.target}'
|
||||
if self.ou:
|
||||
s += gettext(' (scope "{0}")').format(self.ou)
|
||||
return s
|
||||
|
|
Loading…
Reference in New Issue