Skip to content

Commit

Permalink
Merge pull request #336 from kuzi-moto/referrer_fix
Browse files Browse the repository at this point in the history
Set referrer to empty string if it doesn't exist
  • Loading branch information
sgiehl authored May 16, 2022
2 parents 6f66f96 + 33ba655 commit fa17337
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 fa17337

Please sign in to comment.