diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 968e670dd..7b305f531 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index 3fe495b15..ef3c1cce5 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/global.d.ts b/netbox/project-static/src/global.d.ts index a249071f2..59d68a405 100644 --- a/netbox/project-static/src/global.d.ts +++ b/netbox/project-static/src/global.d.ts @@ -30,8 +30,8 @@ type APIError = { type APIObjectBase = { id: number; - display?: string; - name: string; + display: string; + name?: Nullable; url: string; [k: string]: JSONAble; }; diff --git a/netbox/project-static/src/select/api.ts b/netbox/project-static/src/select/api.ts index eb0d92888..0a3870780 100644 --- a/netbox/project-static/src/select/api.ts +++ b/netbox/project-static/src/select/api.ts @@ -15,7 +15,7 @@ import { import type { Option } from 'slim-select/dist/data'; -type QueryFilter = Map; +type QueryFilter = Map; // Various one-off patterns to replace in query param keys. const REPLACE_PATTERNS = [ @@ -161,6 +161,7 @@ class APISelect { this.updatePathValues(filter); } + this.queryParams.set('brief', true); this.queryParams.set('limit', 0); this.updateQueryUrl(); @@ -414,7 +415,7 @@ class APISelect { private updateQueryUrl(): void { // Create new URL query parameters based on the current state of `queryParams` and create an // updated API query URL. - const query = {} as Record; + const query = {} as Dict; for (const [key, value] of this.queryParams.entries()) { query[key] = value; } @@ -529,7 +530,7 @@ class APISelect { displayName = result[legacyDisplayProperty] as string; } - if (!displayName) { + if (!displayName && typeof result.name === 'string') { displayName = result.name; }