From e2b72589bc03a7a2994d0cb48a3f886deb152720 Mon Sep 17 00:00:00 2001 From: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Date: Wed, 1 Oct 2025 17:25:23 +0530 Subject: [PATCH] [MISC] Fixed variable name typo of AdapterKeys.PLATFORM_PROVIDED_UNSTRUCT_KEY (#1559) * misc: Fixed variable name typo and added gitignore entries * Update .gitignore Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .gitignore | 8 +++++++- backend/adapter_processor_v2/adapter_processor.py | 4 ++-- backend/utils/serializer/integrity_error_mixin.py | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c02f69f9..e912bde5 100644 --- a/.gitignore +++ b/.gitignore @@ -625,9 +625,15 @@ backend/plugins/subscription/* # API Deployment Plugins backend/plugins/api/** -# Notfication plugins +# Notification Plugin backend/plugins/notification/** +# Configuration Plugin +backend/plugins/configuration/** + +# Verticals Usage Plugin +backend/plugins/verticals_usage/** + # BE pluggable-apps backend/pluggable_apps/* diff --git a/backend/adapter_processor_v2/adapter_processor.py b/backend/adapter_processor_v2/adapter_processor.py index 9c2f2aef..82e53ab7 100644 --- a/backend/adapter_processor_v2/adapter_processor.py +++ b/backend/adapter_processor_v2/adapter_processor.py @@ -123,7 +123,7 @@ class AdapterProcessor: ): if ( adapter_metadata.get( - AdapterKeys.PLATFORM_PROVIDED_UNSTRUCT_KEY + AdapterKeys.PLATFORM_PROVIDED_UNSTRACT_KEY ) and add_unstract_key ): @@ -153,7 +153,7 @@ class AdapterProcessor: if adapter_metadata.pop(AdapterKeys.ADAPTER_TYPE) == AdapterKeys.X2TEXT: if ( - adapter_metadata.get(AdapterKeys.PLATFORM_PROVIDED_UNSTRUCT_KEY) + adapter_metadata.get(AdapterKeys.PLATFORM_PROVIDED_UNSTRACT_KEY) and add_unstract_key ): adapter_metadata = add_unstract_key(adapter_metadata) diff --git a/backend/utils/serializer/integrity_error_mixin.py b/backend/utils/serializer/integrity_error_mixin.py index 193e5ad6..ff068ce3 100644 --- a/backend/utils/serializer/integrity_error_mixin.py +++ b/backend/utils/serializer/integrity_error_mixin.py @@ -1,6 +1,10 @@ +import logging + from django.db import IntegrityError from rest_framework.exceptions import ValidationError +logger = logging.getLogger(__name__) + class IntegrityErrorMixin: """Mixin to handle IntegrityError across multiple serializers for unique @@ -30,7 +34,7 @@ class IntegrityErrorMixin: field = field_error_message_map.get("field") message = field_error_message_map.get("message") raise ValidationError({field: message}) - + logger.exception("IntegrityError: %s", error) # Default message if the error doesn't match any known unique constraints raise ValidationError( {"detail": "An error occurred while saving. Please try again."}