Skip to content

Commit b20df3c

Browse files
chandrasekharan-zipstackcoderabbitai[bot]
authored andcommitted
[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>
1 parent 1fa86ec commit b20df3c

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,15 @@ backend/plugins/subscription/*
625625
# API Deployment Plugins
626626
backend/plugins/api/**
627627

628-
# Notfication plugins
628+
# Notification Plugin
629629
backend/plugins/notification/**
630630

631+
# Configuration Plugin
632+
backend/plugins/configuration/**
633+
634+
# Verticals Usage Plugin
635+
backend/plugins/verticals_usage/**
636+
631637
# BE pluggable-apps
632638
backend/pluggable_apps/*
633639

backend/adapter_processor_v2/adapter_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_adapter(adapter_id: str, adapter_metadata: dict[str, Any]) -> bool:
123123
):
124124
if (
125125
adapter_metadata.get(
126-
AdapterKeys.PLATFORM_PROVIDED_UNSTRUCT_KEY
126+
AdapterKeys.PLATFORM_PROVIDED_UNSTRACT_KEY
127127
)
128128
and add_unstract_key
129129
):
@@ -153,7 +153,7 @@ def test_adapter(adapter_id: str, adapter_metadata: dict[str, Any]) -> bool:
153153

154154
if adapter_metadata.pop(AdapterKeys.ADAPTER_TYPE) == AdapterKeys.X2TEXT:
155155
if (
156-
adapter_metadata.get(AdapterKeys.PLATFORM_PROVIDED_UNSTRUCT_KEY)
156+
adapter_metadata.get(AdapterKeys.PLATFORM_PROVIDED_UNSTRACT_KEY)
157157
and add_unstract_key
158158
):
159159
adapter_metadata = add_unstract_key(adapter_metadata)

backend/utils/serializer/integrity_error_mixin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
import logging
2+
13
from django.db import IntegrityError
24
from rest_framework.exceptions import ValidationError
35

6+
logger = logging.getLogger(__name__)
7+
48

59
class IntegrityErrorMixin:
610
"""Mixin to handle IntegrityError across multiple serializers for unique
@@ -30,7 +34,7 @@ def handle_integrity_error(self, error):
3034
field = field_error_message_map.get("field")
3135
message = field_error_message_map.get("message")
3236
raise ValidationError({field: message})
33-
37+
logger.exception("IntegrityError: %s", error)
3438
# Default message if the error doesn't match any known unique constraints
3539
raise ValidationError(
3640
{"detail": "An error occurred while saving. Please try again."}

0 commit comments

Comments
 (0)