There was an error while loading. Please reload this page.
1 parent 93232e1 commit 24a7faeCopy full SHA for 24a7fae
1 file changed
mongoose/enrich/geoip.py
@@ -33,7 +33,8 @@ def request_geoip(self, ip_address: str) -> Optional[Dict[Any, Any]]:
33
reader = maxminddb.open_database(str(self.database_path))
34
geoip_data = {}
35
record = reader.get(ip_address)
36
- if not record:
+
37
+ if not record or not record.get("autonomous_system_number", None):
38
raise IgnoreCacheException() # prevents caching
39
40
geoip_data["details"] = record.get("anonymous_ip", None)
0 commit comments