diff --git a/taiga/projects/issues/models.py b/taiga/projects/issues/models.py index c289581b..dd92a771 100644 --- a/taiga/projects/issues/models.py +++ b/taiga/projects/issues/models.py @@ -28,7 +28,7 @@ from taiga.projects.occ import OCCModelMixin from taiga.projects.mixins.blocked import BlockedMixin -class Issue(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin): +class Issue(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin, models.Model): ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None, verbose_name=_("ref")) owner = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, default=None, diff --git a/taiga/projects/models.py b/taiga/projects/models.py index ff1d3a10..613e1b0c 100644 --- a/taiga/projects/models.py +++ b/taiga/projects/models.py @@ -110,7 +110,7 @@ class ProjectDefaults(models.Model): abstract = True -class Project(ProjectDefaults, TaggedMixin): +class Project(ProjectDefaults, TaggedMixin, models.Model): name = models.CharField(max_length=250, unique=True, null=False, blank=False, verbose_name=_("name")) slug = models.SlugField(max_length=250, unique=True, null=False, blank=True, diff --git a/taiga/projects/tasks/models.py b/taiga/projects/tasks/models.py index f27a0f86..f4b0d12f 100644 --- a/taiga/projects/tasks/models.py +++ b/taiga/projects/tasks/models.py @@ -30,7 +30,7 @@ from taiga.projects.milestones.models import Milestone from taiga.projects.mixins.blocked import BlockedMixin -class Task(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin): +class Task(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin, models.Model): user_story = models.ForeignKey("userstories.UserStory", null=True, blank=True, related_name="tasks", verbose_name=_("user story")) ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None, diff --git a/taiga/projects/userstories/models.py b/taiga/projects/userstories/models.py index aa0212d2..3d9a2cf5 100644 --- a/taiga/projects/userstories/models.py +++ b/taiga/projects/userstories/models.py @@ -51,7 +51,7 @@ class RolePoints(models.Model): return "{}: {}".format(self.role.name, self.points.name) -class UserStory(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin): +class UserStory(OCCModelMixin, WatchedModelMixin, BlockedMixin, TaggedMixin, models.Model): ref = models.BigIntegerField(db_index=True, null=True, blank=True, default=None, verbose_name=_("ref")) diff --git a/tests/integration/test_tags.py b/tests/integration/test_tags.py index 987d26d8..56eb76c4 100644 --- a/tests/integration/test_tags.py +++ b/tests/integration/test_tags.py @@ -1,11 +1,13 @@ import pytest +from django.db import models + from taiga.base import tags pytestmark = pytest.mark.django_db -class TaggedModel(tags.TaggedMixin): +class TaggedModel(tags.TaggedMixin, models.Model): class Meta: app_label = "base"