Update owner with is_user check
@@ -4,6 +4,7 @@ from django.core.validators import validate_unicode_slug
from django.db import models
from django.utils.functional import cached_property
+from constants import content_types
from db.models.utils import DiffModel
@@ -31,3 +32,7 @@ class Owner(DiffModel):
@cached_property
def owner_type(self):
return self.content_type.model
+
+ @cached_property
+ def is_user_owner(self):
+ return self.owner_type == content_types.USER
