refactors

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-01 03:42:31 +00:00
parent 861ca016aa
commit 55a00bf1ad
7 changed files with 498 additions and 18 deletions

View File

@@ -151,9 +151,10 @@ def wordpress_status_webhook(request):
if post_url:
content.external_url = post_url
# Only update IGNY8 status if WordPress status changed from draft to publish
if post_status == 'publish' and old_status != 'published':
content.status = 'published'
# FIXED: Always update status when WordPress status differs
if content.status != igny8_status:
content.status = igny8_status
logger.info(f"[wordpress_status_webhook] Status updated: {old_status}{content.status}")
# Update WordPress status in metadata
if not content.metadata: