Jul 8 - Update issue assignment separation

This commit is contained in:
2026-07-08 14:05:57 -04:00
parent b06d939ac0
commit f08ca997d7
4 changed files with 100 additions and 2 deletions
+14
View File
@@ -732,6 +732,20 @@ def create():
reported_at = now_eastern(),
reported_by = current_user.id,
)
# "Handled By" — staff only; customer-created issues stay internal.
if current_user.role != 'customer':
handler = form.handler_type.data or 'internal'
if handler not in ('internal', 'facility', 'vendor'):
handler = 'internal'
issue.handler_type = handler
issue.facility_handler_name = (form.facility_handler_name.data or '').strip() or None
issue.facility_handler_contact = (form.facility_handler_contact.data or '').strip() or None
issue.facility_handler_notes = (form.facility_handler_notes.data or '').strip() or None
issue.vendor_name = (form.vendor_name.data or '').strip() or None
issue.vendor_contact = (form.vendor_contact.data or '').strip() or None
issue.vendor_notes = (form.vendor_notes.data or '').strip() or None
db.session.add(issue)
db.session.commit()
current_app.logger.info(