|
|
|
|
@ -27,7 +27,7 @@ from .service import bulk_update_equipment
|
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.post("", response_model=StandardResponse[CalculationTimeConstrainsRead])
|
|
|
|
|
@router.post("", response_model=StandardResponse[Union[str, CalculationTimeConstrainsRead]])
|
|
|
|
|
async def create_calculation_time_constrains(db_session: DbSession, current_user: CurrentUser, calculation_time_constrains_in: CalculationTimeConstrainsParametersCreate, scope_calculation_id: Optional[str] = Query(None), with_results: Optional[int] = Query(0)):
|
|
|
|
|
"""Save calculation time constrains Here"""
|
|
|
|
|
|
|
|
|
|
@ -36,6 +36,7 @@ async def create_calculation_time_constrains(db_session: DbSession, current_user
|
|
|
|
|
else:
|
|
|
|
|
results = await create_calculation(db_session=db_session, calculation_time_constrains_in=calculation_time_constrains_in, created_by=current_user.name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not with_results:
|
|
|
|
|
results = str(results.id)
|
|
|
|
|
|
|
|
|
|
|