Updated iamge prompt flow adn frotnend backend

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-11 18:10:18 +00:00
parent fa696064e2
commit a1b21f39f6
10 changed files with 611 additions and 196 deletions

View File

@@ -151,9 +151,9 @@ class GenerateImagePromptsFunction(BaseAIFunction):
prompts_created = 0
with transaction.atomic():
# Save featured image prompt
# Save featured image prompt - use content instead of task
Images.objects.update_or_create(
task=content.task,
content=content,
image_type='featured',
defaults={
'prompt': parsed['featured_prompt'],
@@ -171,7 +171,7 @@ class GenerateImagePromptsFunction(BaseAIFunction):
heading = h2_headings[idx] if idx < len(h2_headings) else f"Section {idx + 1}"
Images.objects.update_or_create(
task=content.task,
content=content,
image_type='in_article',
position=idx + 1,
defaults={