I get 500 Server errors when searching for resources with a non-empty string.
With DEBUG=True I can get the exception: Invalid database type; expected IPv4 address which is backtraced to the getcountry_code function in the stats/geoip.py file.
The proposed try/except patch fixes the issue by returning the default empty string if geoip cannot find the country.
As far as I know, this is used for statistic purposes, so providing the country guessed by the IP it is not crucial for metashare.
I get 500 Server errors when searching for resources with a non-empty string. With
DEBUG=True
I can get the exception:Invalid database type; expected IPv4 address
which is backtraced to thegetcountry_code
function in thestats/geoip.py
file.The proposed try/except patch fixes the issue by returning the default empty string if geoip cannot find the country.
As far as I know, this is used for statistic purposes, so providing the country guessed by the IP it is not crucial for metashare.