Permalink
Browse files

user_id doesn't always exist

  • Loading branch information...
jeffbryner committed Nov 28, 2018
1 parent f9c822f commit 80847d974797372d8576a1b0bbb05e98a6eb6e77
Showing with 5 additions and 1 deletion.
  1. +5 −1 cron/auth02mozdef.py
@@ -276,9 +276,13 @@ def process_msg(mozmsg, msg):
# fields that should always exist
mozmsg.timestamp = msg.date
details['messageid'] = msg._id
details['userid'] = msg.user_id
details['sourceipaddress'] = msg.ip

try:
details['userid'] = msg.user_id
except KeyError:
pass

try:
details['username'] = msg.user_name
except KeyError:

0 comments on commit 80847d9

Please sign in to comment.