Skip to content

Commit

Permalink
Merge pull request #163 from openclimatefix/fix-url
Browse files Browse the repository at this point in the history
small fix to get url
  • Loading branch information
peterdudfield authored Apr 23, 2024
2 parents b9d8282 + ddc4d27 commit d12bc38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pv_site_api/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def wrapper(*args, **kwargs): # noqa
# save route variables to db
session = route_variables.get("session", None)
user = route_variables.get("user", None)
url = route_variables.get("url", None)
request = route_variables.get("request", None)
if request:
url = str(request.url)
else:
url = None
save_api_call_to_db(url=url, session=session, user=user)

# drop session and user
Expand Down

0 comments on commit d12bc38

Please sign in to comment.