This commit is contained in:
alorig
2025-11-22 20:29:26 +05:00
parent 6e25c5e307
commit 6f50b3c88f
2 changed files with 33 additions and 12 deletions

View File

@@ -169,7 +169,10 @@ class IntegrationViewSet(SiteSectorModelViewSet):
)
service = IntegrationService()
result = service.test_connection(integration)
# Mark this as initial connection test since API key was provided in request body
# This allows the test to pass even if WordPress plugin hasn't stored the key yet
is_initial_connection = bool(api_key and request.data.get('api_key'))
result = service._test_wordpress_connection(integration, is_initial_connection=is_initial_connection)
if result.get('success'):
return success_response(result, request=request)