fix(api): prevent 500 on Jira integrations with sparse fieldsets (#12261)

This commit is contained in:
Rubén De la Torre Vico authored and GitHub committed 2026-07-31 15:03:04 +02:00
1 parent 74a760517e
commit b08d2eb472
6 files changed
+166 -41

No files matched your search

+20
View File
@@ -1450,6 +1450,26 @@ def integrations_fixture(aws_provider_pair):
return integration1, integration2
@pytest.fixture
def jira_integration_fixture(tenants_fixture):
# Jira is a tenant-wide integration: it is not attached to any provider, and its
# `domain` is read from the credentials when the integration is serialized
tenant_id = tenants_fixture[0].id
with rls_transaction(str(tenant_id)):
return Integration.objects.create(
tenant_id=tenant_id,
enabled=True,
connected=True,
integration_type=Integration.IntegrationChoices.JIRA,
configuration={"projects": {"TEST": "Test project"}},
credentials={
"domain": "test",
"user_mail": "a@b.com",
"api_token": "token",
},
)
@pytest.fixture
def backfill_scan_metadata_fixture(scans_fixture, findings_fixture):
for scan_instance in scans_fixture: