瀏覽代碼

Fixes: #8866 - Does not perform API Select Search if a django peramiter has not been replaced

Alex Gittings 3 年之前
父節點
當前提交
3edff89a4d

File diff suppressed because it is too large
+ 0 - 0
netbox/project-static/dist/netbox.js


File diff suppressed because it is too large
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 6 - 3
netbox/project-static/src/select/api/apiSelect.ts

@@ -557,9 +557,12 @@ export class APISelect {
   private async handleSearch(event: Event) {
   private async handleSearch(event: Event) {
     const { value: q } = event.target as HTMLInputElement;
     const { value: q } = event.target as HTMLInputElement;
     const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
     const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
-    await this.fetchOptions(url, 'merge');
-    this.slim.data.search(q);
-    this.slim.render();
+    if (!url.includes(`{{`)) {
+      await this.fetchOptions(url, 'merge');
+      this.slim.data.search(q);
+      this.slim.render();
+    }
+    return;
   }
   }
 
 
   /**
   /**

Some files were not shown because too many files changed in this diff