Stefan McShane 3 лет назад
Родитель
Сommit
e72865413c
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      api/server/handlers/project_integration/list_aws.go

+ 6 - 0
api/server/handlers/project_integration/list_aws.go

@@ -72,5 +72,11 @@ func (p *ListAWSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		res = append(res, awsInt.ToAWSIntegrationType())
 	}
 
+	if len(awsInts) == 0 {
+		// so that the datatype stays the same on all returns
+		p.WriteResult(w, r, []*types.AWSIntegration{})
+		return
+	}
+
 	p.WriteResult(w, r, res)
 }