notifciations issues fixed final

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-28 00:52:14 +00:00
parent 28a60f8141
commit 0605f650b1
12 changed files with 1384 additions and 18 deletions

View File

@@ -426,6 +426,21 @@ class KeywordViewSet(SiteSectorModelViewSet):
errors.append(f"Error adding '{seed_keyword.keyword}': {str(e)}")
skipped_count += 1
# Create notification if keywords were added
if created_count > 0:
try:
from igny8_core.business.notifications.services import NotificationService
NotificationService.notify_keywords_imported(
account=account,
site=site,
count=created_count
)
except Exception as e:
# Don't fail the request if notification fails
import logging
logger = logging.getLogger(__name__)
logger.warning(f"Failed to create notification for keywords import: {e}")
return success_response(
data={
'created': created_count,