Skip to content

Commit

Permalink
events: fix geoip enrich context not converting to json-seriazable data
Browse files Browse the repository at this point in the history
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
  • Loading branch information
rissson committed May 27, 2024
1 parent 2cff3d1 commit 60374c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authentik/events/context_processors/geoip.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def enrich_event(self, event: "Event"):

def enrich_context(self, request: HttpRequest) -> dict:
# Different key `geoip` vs `geo` for legacy reasons
return {"geoip": self.city(ClientIPMiddleware.get_client_ip(request))}
return {"geoip": self.city_dict(ClientIPMiddleware.get_client_ip(request))}

Check warning on line 48 in authentik/events/context_processors/geoip.py

View check run for this annotation

Codecov / codecov/patch

authentik/events/context_processors/geoip.py#L48

Added line #L48 was not covered by tests

def city(self, ip_address: str) -> City | None:
"""Wrapper for Reader.city"""
Expand Down

0 comments on commit 60374c4

Please sign in to comment.