Small bug fixes
This commit is contained in:
@@ -44,7 +44,7 @@ def ingress_request(
|
||||
service_uuid, tracker, time, payload, ip, location, user_agent, identifier=""
|
||||
):
|
||||
try:
|
||||
service = Service.objects.get(uuid=service_uuid, status=Service.ACTIVE)
|
||||
service = Service.objects.get(pk=service_uuid, status=Service.ACTIVE)
|
||||
log.debug(f"Linked to service {service}")
|
||||
|
||||
ip_data = _geoip2_lookup(ip)
|
||||
|
||||
@@ -15,8 +15,8 @@ from ..tasks import ingress_request
|
||||
def ingress(request, service_uuid, identifier, tracker, payload):
|
||||
time = timezone.now()
|
||||
client_ip, is_routable = get_client_ip(request)
|
||||
location = request.META.get("HTTP_REFERER")
|
||||
user_agent = request.META.get("HTTP_USER_AGENT")
|
||||
location = request.META.get("HTTP_REFERER") or ""
|
||||
user_agent = request.META.get("HTTP_USER_AGENT") or ""
|
||||
|
||||
ingress_request.delay(
|
||||
service_uuid,
|
||||
|
||||
Reference in New Issue
Block a user