fix: auto-fix findings from no-mistakes review

- Remove duplicate  import
- Fix  →  in create ticket
- Fix  →  in ticket detail
- Add note field to TicketUpdate schema and handle note-only updates in backend
- Update frontend submitNote() to use PATCH endpoint
This commit is contained in:
root
2026-07-23 19:06:33 +00:00
parent 9aa7971a28
commit 3dc383e62d
5 changed files with 17 additions and 7 deletions
+12
View File
@@ -275,6 +275,18 @@ async def update_ticket(
ticket.status = new_status
# Handle standalone note (no status change)
note_only = data.get("note")
if note_only and (new_status is None or new_status == ticket.status):
await _log_status_change(
db,
ticket.id,
from_status=ticket.status,
to_status=ticket.status,
note=note_only,
user_id=user.id if user else None,
)
# Update other fields
for field in ("unit_id", "category_id", "priority", "reporter", "reported_via",
"description", "assigned_to", "eta", "cost", "parts_used"):