Skip to content

Commit

Permalink
Set referrer to empty if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzi-moto committed May 16, 2022
1 parent 6f66f96 commit 33ba655
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions import_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2484,6 +2484,8 @@ def filtered_line(line, reason):
try:
hit.referrer = format.get('referrer')

if hit.referrer is None:
hit.referrer = ''
if hit.referrer.startswith('"'):
hit.referrer = hit.referrer[1:-1]
except BaseFormatException:
Expand Down

0 comments on commit 33ba655

Please sign in to comment.