Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions grimoire_elk/enriched/enrich.py
Original file line number Diff line number Diff line change
@@ -447,7 +447,7 @@ def get_email_domain(self, email):
domain = None
try:
domain = email.split("@")[1]
except IndexError:
except (IndexError, AttributeError):
# logger.warning("Bad email format: %s" % (identity['email']))
pass
return domain
@@ -801,8 +801,7 @@ def get_item_sh_fields(self, identity=None, item_date=None, sh_id=None,
eitem_sh[rol + "_name"] = profile.get('name', eitem_sh[rol + "_name"])

email = profile.get('email', None)
if email:
eitem_sh[rol + "_domain"] = self.get_email_domain(email)
eitem_sh[rol + "_domain"] = self.get_email_domain(email)

eitem_sh[rol + "_gender"] = profile.get('gender', self.unknown_gender)
eitem_sh[rol + "_gender_acc"] = profile.get('gender_acc', 0)

0 comments on commit 6fa82bd

Please sign in to comment.