mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-08-11 00:30:12 -04:00
Several support reports traced back to one root cause: a mistyped access
code in Add Printer left an empty card on the dashboard. POST /printers/
was persisting the row first, then firing connect_printer() fire-and-forget.
Now we test_connection() BEFORE the insert; failure returns HTTP 400 and
the row is never written.
Structured error response -- detail={"code", "message"} -- so the toast
shows the localized message instead of the English fallback. New
ApiError.code field on the frontend; printers.toast.connectionFailedNotAdded
10 lines
233 B
Bash
Executable file
10 lines
233 B
Bash
Executable file
#!/bin/sh
|
|
|
|
cd backend
|
|
ruff check && ruff format --check
|
|
|
|
if [ "$1" = "--full" ]; then
|
|
../venv/bin/python3 -m pytest tests/ -v -n 30
|
|
else
|
|
../venv/bin/python3 -m pytest tests/ -v -n 30 --ignore=tests/unit/services/test_bambu_ftp.py
|
|
fi
|