From f2079de2cb8bd50ed87cda49086f4704df7a171a Mon Sep 17 00:00:00 2001
From: jeremystretch <jstretch@ns1.com>
Date: Mon, 14 Mar 2022 13:55:35 -0400
Subject: [PATCH] Fixes #8838: Fix FieldError exception during global search

---
 docs/release-notes/version-3.2.md | 1 +
 netbox/dcim/filtersets.py         | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/release-notes/version-3.2.md b/docs/release-notes/version-3.2.md
index 3704f77b8..aba88e46c 100644
--- a/docs/release-notes/version-3.2.md
+++ b/docs/release-notes/version-3.2.md
@@ -147,6 +147,7 @@ Where it is desired to limit the range of available VLANs within a group, users
 
 ### Bug Fixes (From Beta2)
 
+* [#8838](https://github.com/netbox-community/netbox/issues/8838) - Fix FieldError exception during global search
 * [#8845](https://github.com/netbox-community/netbox/issues/8845) - Correct default ASN formatting in table
 * [#8869](https://github.com/netbox-community/netbox/issues/8869) - Fix NoReverseMatch exception when displaying tag w/assignments
 
diff --git a/netbox/dcim/filtersets.py b/netbox/dcim/filtersets.py
index 140955371..3c63073e2 100644
--- a/netbox/dcim/filtersets.py
+++ b/netbox/dcim/filtersets.py
@@ -160,7 +160,6 @@ class SiteFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
             Q(comments__icontains=value)
         )
         try:
-            qs_filter |= Q(asn=int(value.strip()))
             qs_filter |= Q(asns__asn=int(value.strip()))
         except ValueError:
             pass