Make ingress processing more resilient

This commit is contained in:
R. Miles McCain 2020-06-28 03:48:40 +00:00
parent 88f25b6743
commit 87a411f42d
No known key found for this signature in database
GPG Key ID: F1053629E2905557

View File

@ -121,11 +121,11 @@ def ingress_request(
device=ua.device.family or ua.device.model or "", device=ua.device.family or ua.device.model or "",
device_type=device_type, device_type=device_type,
os=ua.os.family or "", os=ua.os.family or "",
asn=ip_data.get("asn", ""), asn=ip_data.get("asn") or "",
country=ip_data.get("country", ""), country=ip_data.get("country") or "",
longitude=ip_data.get("longitude"), longitude=ip_data.get("longitude"),
latitude=ip_data.get("latitude"), latitude=ip_data.get("latitude"),
time_zone=ip_data.get("time_zone", ""), time_zone=ip_data.get("time_zone") or "",
) )
cache.set( cache.set(
session_cache_path, session.pk, timeout=settings.SESSION_MEMORY_TIMEOUT session_cache_path, session.pk, timeout=settings.SESSION_MEMORY_TIMEOUT