Skip to content

Commit

Permalink
Put the is_publised attribute in the AbstractBaseModel class
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Feb 28, 2024
1 parent 64822ea commit 757f002
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions backend/core/base_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class AbstractBaseModel(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
created_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Created at"))
updated_at = models.DateTimeField(auto_now=True, verbose_name=_("UpdatedÒ at"))
is_published = models.BooleanField(_("published"), default=True)

class Meta:
abstract = True
Expand Down
3 changes: 0 additions & 3 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class Threat(ReferentialObjectMixin):
library = models.ForeignKey(
Library, on_delete=models.CASCADE, null=True, blank=True, related_name="threats"
)
is_published = models.BooleanField(_("published"), default=True)

class Meta:
verbose_name = _("Threat")
Expand Down Expand Up @@ -189,7 +188,6 @@ class SecurityFunction(ReferentialObjectMixin):
typical_evidence = models.JSONField(
verbose_name=_("Typical evidence"), null=True, blank=True
)
is_published = models.BooleanField(_("published"), default=True)

class Meta:
verbose_name = _("Security function")
Expand Down Expand Up @@ -423,7 +421,6 @@ class Type(models.TextChoices):
parent_assets = models.ManyToManyField(
"self", blank=True, verbose_name=_("parent assets"), symmetrical=False
)
is_published = models.BooleanField(_("published"), default=True)

fields_to_check = ["name"]

Expand Down

0 comments on commit 757f002

Please sign in to comment.