asdasd
This commit is contained in:
@@ -348,17 +348,22 @@ class KeywordViewSet(SiteSectorModelViewSet):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Create Keyword if it doesn't exist
|
# Create Keyword if it doesn't exist
|
||||||
|
# New keywords should default to status 'new' (per updated workflow plan)
|
||||||
keyword, created = Keywords.objects.get_or_create(
|
keyword, created = Keywords.objects.get_or_create(
|
||||||
seed_keyword=seed_keyword,
|
seed_keyword=seed_keyword,
|
||||||
site=site,
|
site=site,
|
||||||
sector=sector,
|
sector=sector,
|
||||||
defaults={
|
defaults={
|
||||||
'status': 'pending',
|
'status': 'new',
|
||||||
'account': account
|
'account': account
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Ensure status is explicitly set to 'new' for newly created keywords
|
||||||
if created:
|
if created:
|
||||||
|
if getattr(keyword, 'status', None) != 'new':
|
||||||
|
keyword.status = 'new'
|
||||||
|
keyword.save(update_fields=['status'])
|
||||||
created_count += 1
|
created_count += 1
|
||||||
else:
|
else:
|
||||||
skipped_count += 1
|
skipped_count += 1
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export default function Keywords() {
|
|||||||
volume_override: null,
|
volume_override: null,
|
||||||
difficulty_override: null,
|
difficulty_override: null,
|
||||||
cluster_id: null,
|
cluster_id: null,
|
||||||
status: 'pending',
|
status: 'new',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Progress modal for AI functions
|
// Progress modal for AI functions
|
||||||
|
|||||||
Reference in New Issue
Block a user