Skip to content

Commit

Permalink
Remove constraint from PDFRequest to fix category delete
Browse files Browse the repository at this point in the history
  • Loading branch information
pehala committed Jun 14, 2024
1 parent 0ad71a3 commit 10ff998
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pdf/models/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
ForeignKey,
CASCADE,
SET_NULL,
CheckConstraint,
Q,
PositiveIntegerField,
)
from django.utils.translation import gettext_lazy as _
Expand Down Expand Up @@ -77,12 +75,6 @@ def get_songs(self) -> List[Song]:
class Meta:
verbose_name = _("PDFRequest")
verbose_name_plural = _("PDFRequests")
constraints = [
CheckConstraint(
check=Q(type=RequestType.MANUAL) | Q(category__isnull=False),
name="automated_category_present",
),
]
ordering = ["-update_date"]


Expand Down

0 comments on commit 10ff998

Please sign in to comment.