issues fixes related to autaitmioan and ai idea genration
This commit is contained in:
@@ -205,7 +205,10 @@ class GenerateIdeasFunction(BaseAIFunction):
|
||||
elif not isinstance(description, str):
|
||||
description = str(description)
|
||||
|
||||
# Handle target_keywords
|
||||
# Handle primary_focus_keywords (new field)
|
||||
primary_focus_keywords = idea_data.get('primary_focus_keywords', '')
|
||||
|
||||
# Handle target_keywords (covered_keywords from AI)
|
||||
target_keywords = idea_data.get('covered_keywords', '') or idea_data.get('target_keywords', '')
|
||||
|
||||
# Direct mapping - no conversion needed
|
||||
@@ -216,6 +219,7 @@ class GenerateIdeasFunction(BaseAIFunction):
|
||||
ContentIdeas.objects.create(
|
||||
idea_title=idea_data.get('title', 'Untitled Idea'),
|
||||
description=description, # Stored as JSON string
|
||||
primary_focus_keywords=primary_focus_keywords,
|
||||
content_type=content_type,
|
||||
content_structure=content_structure,
|
||||
target_keywords=target_keywords,
|
||||
|
||||
Reference in New Issue
Block a user