Add configurable production machine constraints
This commit is contained in:
@@ -20,6 +20,7 @@ from flask_httpauth import HTTPBasicAuth
|
||||
from werkzeug.security import check_password_hash
|
||||
|
||||
from core_presets import CORE_PRESETS
|
||||
from machine_constraints import check_production_feasibility
|
||||
from conversation_service import (
|
||||
ConversationNotFoundError,
|
||||
ConversationReportNotFoundError,
|
||||
@@ -264,6 +265,19 @@ def create_transport_calculation():
|
||||
return jsonify(result), 200
|
||||
|
||||
|
||||
@app.route("/api/calculations/production-feasibility", methods=["POST"])
|
||||
@auth.login_required
|
||||
def create_production_feasibility_calculation():
|
||||
"""Check configured production-machine constraints through the shared domain."""
|
||||
result = check_production_feasibility(request.get_json(silent=True))
|
||||
log_access(
|
||||
auth.current_user(),
|
||||
"/api/calculations/production-feasibility",
|
||||
"POST",
|
||||
)
|
||||
return jsonify(result), 200
|
||||
|
||||
|
||||
def _create_pdf(calculation_request):
|
||||
result = calculate_roll(calculation_request, build_info=BUILD_INFO)
|
||||
report = report_from_calculation_result(result)
|
||||
|
||||
Reference in New Issue
Block a user