fix(chalice): fixed issues-tracking error handler (#2593)

This commit is contained in:
Kraiem Taha Yassine 2024-09-17 12:42:34 +02:00 committed by GitHub
parent c7e6f31941
commit 5d786bde56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -395,10 +395,10 @@ def get_all_issue_tracking_projects(context: schemas.CurrentContext = Depends(OR
if error is not None:
return error
data = integration.issue_handler
if "errors" in data:
if isinstance(data, dict) and "errors" in data:
return data
data = data.get_projects()
if "errors" in data:
if isinstance(data, dict) and "errors" in data:
return data
return {"data": data}
@ -410,10 +410,10 @@ def get_integration_metadata(integrationProjectId: int, context: schemas.Current
if error is not None:
return error
data = integration
if "errors" in data:
if isinstance(data, dict) and "errors" in data:
return data
data = data.issue_handler.get_metas(integrationProjectId)
if "errors" in data:
if isinstance(data, dict) and "errors" in data:
return data
return {"data": data}