[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>
This commit is contained in:
committed by
GitHub
parent
e37029b814
commit
e2b72589bc
8
.gitignore
vendored
8
.gitignore
vendored
@@ -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/*
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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."}
|
||||
|
||||
Reference in New Issue
Block a user