models delte and trash and cascade issues fixes
This commit is contained in:
@@ -440,10 +440,11 @@ class Content(SoftDeletableModel, SiteSectorBaseModel):
|
||||
return super().hard_delete(using=using, keep_parents=keep_parents)
|
||||
|
||||
|
||||
class ContentTaxonomy(SiteSectorBaseModel):
|
||||
class ContentTaxonomy(SoftDeletableModel, SiteSectorBaseModel):
|
||||
"""
|
||||
Simplified taxonomy model for AI-generated categories and tags.
|
||||
Directly linked to Content via many-to-many relationship.
|
||||
Supports soft-delete for trash/restore functionality.
|
||||
"""
|
||||
|
||||
TAXONOMY_TYPE_CHOICES = [
|
||||
@@ -497,6 +498,9 @@ class ContentTaxonomy(SiteSectorBaseModel):
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
objects = SoftDeleteManager()
|
||||
all_objects = models.Manager()
|
||||
|
||||
class Meta:
|
||||
app_label = 'writer'
|
||||
db_table = 'igny8_content_taxonomy_terms'
|
||||
|
||||
Reference in New Issue
Block a user