imp part 5
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from rest_framework import serializers
|
||||
from django.conf import settings
|
||||
|
||||
from .models import Keywords, Clusters, ContentIdeas
|
||||
from igny8_core.auth.models import SeedKeyword
|
||||
@@ -69,12 +68,6 @@ class KeywordSerializer(serializers.ModelSerializer):
|
||||
]
|
||||
read_only_fields = ['id', 'created_at', 'updated_at', 'account_id', 'keyword', 'volume', 'difficulty', 'country']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# Only include Stage 1 fields when feature flag is enabled
|
||||
if getattr(settings, 'USE_SITE_BUILDER_REFACTOR', False):
|
||||
self.fields['attribute_values'] = serializers.JSONField(read_only=True)
|
||||
|
||||
def validate(self, attrs):
|
||||
"""Validate that either seed_keyword_id OR custom keyword fields are provided"""
|
||||
# For create operations, need either seed_keyword_id OR custom keyword
|
||||
|
||||
Reference in New Issue
Block a user