Default customer to 'internal' when left blank
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -221,7 +221,7 @@ async def create_job(
|
||||
filename = stl_select
|
||||
|
||||
amount = max(1, amount)
|
||||
customer_str = customer.strip() or None
|
||||
customer_str = customer.strip() or "internal"
|
||||
job_name = Path(filename).stem if filename else (customer_str or "Unnamed")
|
||||
|
||||
# Resolve bracket — auto-create one when printing multiple copies
|
||||
@@ -320,7 +320,7 @@ def edit_job(
|
||||
job = db.query(PrintJob).filter(PrintJob.id == job_id).first()
|
||||
if not job:
|
||||
raise HTTPException(status_code=404, detail="Job not found")
|
||||
job.customer = customer.strip() or None
|
||||
job.customer = customer.strip() or "internal"
|
||||
job.job_material = job_material or None
|
||||
job.job_color = job_color or None
|
||||
job.priority = bool(priority)
|
||||
|
||||
Reference in New Issue
Block a user