diff --git a/backend/igny8_core/modules/writer/migrations/0006_update_status_choices.py b/backend/igny8_core/modules/writer/migrations/0006_update_status_choices.py new file mode 100644 index 00000000..e0daef95 --- /dev/null +++ b/backend/igny8_core/modules/writer/migrations/0006_update_status_choices.py @@ -0,0 +1,18 @@ +# Generated manually to update status field choices + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('writer', '0005_move_content_fields_to_content'), + ] + + operations = [ + # No database changes needed - just updating Python-level choices + # Tasks status: queued, completed + # Content status: draft, review, published + # Existing data will remain valid + ] + diff --git a/backend/igny8_core/modules/writer/models.py b/backend/igny8_core/modules/writer/models.py index 72865d66..d55fbd9f 100644 --- a/backend/igny8_core/modules/writer/models.py +++ b/backend/igny8_core/modules/writer/models.py @@ -106,7 +106,12 @@ class Content(SiteSectorBaseModel): secondary_keywords = models.JSONField(default=list, blank=True, help_text="List of secondary keywords") tags = models.JSONField(default=list, blank=True, help_text="List of tags") categories = models.JSONField(default=list, blank=True, help_text="List of categories") - status = models.CharField(max_length=50, default='draft', help_text="Content workflow status (draft, review, published, etc.)") + STATUS_CHOICES = [ + ('draft', 'Draft'), + ('review', 'Review'), + ('published', 'Published'), + ] + status = models.CharField(max_length=50, choices=STATUS_CHOICES, default='draft', help_text="Content workflow status (draft, review, published)") generated_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) diff --git a/frontend/src/pages/Writer/Content.tsx b/frontend/src/pages/Writer/Content.tsx index be2dce10..ec6aff02 100644 --- a/frontend/src/pages/Writer/Content.tsx +++ b/frontend/src/pages/Writer/Content.tsx @@ -9,7 +9,6 @@ const statusColors: Record = draft: 'warning', review: 'info', published: 'success', - completed: 'success', }; export default function Content() {