fix: location dropdowns rendered blank (wrong field) + require printer model
Some checks failed
CI / backend (push) Failing after 1m52s
CI / naming (push) Successful in 2s
CI / frontend (push) Successful in 9s
CI / migrations-mysql (push) Failing after 8s

The location option label read l.location, but the Location.to_dict() field is
locationname, so every option rendered blank - the dropdown looked empty and
"massive" (a long list of blank rows). Fixed across all five affected forms:
printers, computers, network devices, network device form, and the subnets
location filter. Other .location uses (printer-driver URL, search-result label,
report bylocation key) are legitimately different fields, left alone.

Also require a model on the printer form: asterisk + required attr, plus a JS
guard in savePrinter (the native required is skipped while the select is
disabled with no vendor picked) that points the user at the vendor first.
This commit is contained in:
cproudlock
2026-07-29 09:07:43 -04:00
parent b9d0cfac6a
commit b63690996a
5 changed files with 17 additions and 6 deletions

View File

@@ -149,7 +149,7 @@
:key="l.locationid"
:value="l.locationid"
>
{{ l.location }}
{{ l.locationname }}
</option>
</select>
</div>