Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

UN-2770 BUG(v0.132.2): Ran 1 file in n8n HITL node, but got 2 files in queue page (#1518)

Deepak K341c44269062
diff --git a/backend/api_v2/serializers.py b/backend/api_v2/serializers.py
index aa949a03d..06ed566c3 100644
--- a/backend/api_v2/serializers.py
+++ b/backend/api_v2/serializers.py
@@ -1,4 +1,3 @@
-import logging
import re
import uuid
from collections import OrderedDict
@@ -30,8 +29,6 @@ from api_v2.constants import ApiExecution
from api_v2.models import APIDeployment, APIKey
from backend.serializers import AuditSerializer
-logger = logging.getLogger(__name__)
-
class APIDeploymentSerializer(IntegrityErrorMixin, AuditSerializer):
class Meta:
@@ -229,32 +226,21 @@ class ExecutionRequestSerializer(TagParamsSerializer):
hitl_queue_name = CharField(required=False, allow_null=True, allow_blank=True)
def validate_hitl_queue_name(self, value: str | None) -> str | None:
- """Validate queue name format: a-z0-9-_ with length and pattern restrictions."""
- if not value:
- return value
-
- # Length validation
- if len(value) < 3:
- raise ValidationError("Queue name must be at least 3 characters long.")
- if len(value) > 50:
- raise ValidationError("Queue name cannot exceed 50 characters.")
-
- # Check valid characters: a-z, 0-9, _, -
- if not re.match(r"^[a-z0-9_-]+$", value):
- raise ValidationError(
- "Queue name can only contain lowercase letters, numbers, underscores, and hyphens."
- )
-
- # Check no starting/ending with _ or -
- if value.startswith(("_", "-")) or value.endswith(("_", "-")):
- raise ValidationError(
- "Queue name cannot start or end with underscore or hyphen."
+ """Validate queue name format using enterprise validation if available."""
+ # Try to use enterprise validation from pluggable_apps
+ try:
+ from pluggable_apps.manual_review_v2.serializers import (
+ validate_hitl_queue_name_format,
)
- # Check no consecutive special characters
- if re.search(r"[_-]{2,}", value):
+ return validate_hitl_queue_name_format(value)
+ except ModuleNotFoundError:
+ # Fallback to basic validation if enterprise features not available
raise ValidationError(
- "Queue name cannot have repeating underscores or hyphens."
+ "Human-in-the-Loop (HITL) queue management requires Unstract Enterprise. "
+ "This advanced workflow feature is available in our enterprise version. "
+ "Learn more at https://docs.unstract.com/unstract/unstract_platform/features/workflows/hqr_deployment_workflows/ or "
+ "contact our sales team at https://unstract.com/contact/"
)
return value