fix return values in pipeline wrapper
This commit is contained in:
@@ -10,12 +10,13 @@ from delta_barth.types import JsonExportResponse, JsonResponse, JsonStatus
|
||||
def pipeline_sales_forecast(
|
||||
company_id: int | None,
|
||||
start_date: Datetime | None,
|
||||
) -> tuple[JsonResponse, JsonStatus]:
|
||||
) -> JsonExportResponse:
|
||||
result = forecast.pipeline_sales(SESSION, company_id=company_id, start_date=start_date)
|
||||
response = JsonResponse(result.response.model_dump_json())
|
||||
status = JsonStatus(result.status.model_dump_json())
|
||||
export = JsonExportResponse(result.model_dump_json())
|
||||
# response = JsonResponse(result.response.model_dump_json())
|
||||
# status = JsonStatus(result.status.model_dump_json())
|
||||
|
||||
return response, status
|
||||
return export
|
||||
|
||||
|
||||
def pipeline_sales_forecast_dummy(
|
||||
|
||||
Reference in New Issue
Block a user