fix export
This commit is contained in:
parent
48e5e09cce
commit
fc94badcf3
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "delta-barth"
|
name = "delta-barth"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
description = "prognosis module"
|
description = "prognosis module"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Florian Förster", email = "f.foerster@d-opt.com"},
|
{name = "Florian Förster", email = "f.foerster@d-opt.com"},
|
||||||
|
|||||||
@ -4,7 +4,7 @@ from datetime import datetime as Datetime
|
|||||||
|
|
||||||
from delta_barth.analysis import forecast
|
from delta_barth.analysis import forecast
|
||||||
from delta_barth.management import SESSION
|
from delta_barth.management import SESSION
|
||||||
from delta_barth.types import JsonResponse, JsonStatus
|
from delta_barth.types import JsonExportResponse, JsonResponse, JsonStatus
|
||||||
|
|
||||||
|
|
||||||
def pipeline_sales_forecast(
|
def pipeline_sales_forecast(
|
||||||
@ -21,13 +21,14 @@ def pipeline_sales_forecast(
|
|||||||
def pipeline_sales_forecast_dummy(
|
def pipeline_sales_forecast_dummy(
|
||||||
company_id: int | None,
|
company_id: int | None,
|
||||||
start_date: Datetime | None,
|
start_date: Datetime | None,
|
||||||
) -> tuple[JsonResponse, JsonStatus]:
|
) -> JsonExportResponse:
|
||||||
result = forecast.pipeline_sales_dummy(
|
result = forecast.pipeline_sales_dummy(
|
||||||
SESSION,
|
SESSION,
|
||||||
company_id=company_id,
|
company_id=company_id,
|
||||||
start_date=start_date,
|
start_date=start_date,
|
||||||
)
|
)
|
||||||
response = JsonResponse(result.response.model_dump_json())
|
export = JsonExportResponse(result.model_dump_json())
|
||||||
status = JsonStatus(result.status.model_dump_json())
|
# response = JsonResponse(result.response.model_dump_json())
|
||||||
|
# status = JsonStatus(result.status.model_dump_json())
|
||||||
|
|
||||||
return response, status
|
return export
|
||||||
|
|||||||
@ -76,6 +76,7 @@ class PipeResult(t.Generic[R]):
|
|||||||
self.results = response
|
self.results = response
|
||||||
|
|
||||||
|
|
||||||
|
JsonExportResponse = t.NewType("JsonExportResponse", str)
|
||||||
JsonResponse = t.NewType("JsonResponse", str)
|
JsonResponse = t.NewType("JsonResponse", str)
|
||||||
JsonStatus = t.NewType("JsonStatus", str)
|
JsonStatus = t.NewType("JsonStatus", str)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user