diff options
| author | Claude Paroz <claude@2xlibre.net> | 2022-07-29 18:34:18 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-07-30 19:29:45 +0200 |
| commit | 1e5bbbb2a866faf56e00eb744ab940e40e87d497 (patch) | |
| tree | 1e781619b8456ac6e74b1d2b3fb405dd7800db73 /django | |
| parent | 6654289f5b350dfca3dc4f6abab777459b906756 (diff) | |
Fixed #33442 -- Allowed GeoIP2 to use DB-IP Lite datasets.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/gis/geoip2/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/gis/geoip2/base.py b/django/contrib/gis/geoip2/base.py index e74984fe45..88b81bfdd2 100644 --- a/django/contrib/gis/geoip2/base.py +++ b/django/contrib/gis/geoip2/base.py @@ -103,11 +103,11 @@ class GeoIP2: reader = geoip2.database.Reader(str(path), mode=cache) db_type = reader.metadata().database_type - if db_type.endswith("City"): + if "City" in db_type: # GeoLite City database detected. self._city = reader self._city_file = path - elif db_type.endswith("Country"): + elif "Country" in db_type: # GeoIP Country database detected. self._country = reader self._country_file = path |
