mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Extract-email now avoids crashing on unlinked api keys
This commit is contained in:
@@ -32,8 +32,9 @@ for char in chars:
|
|||||||
if len(char.eveaccount_set.all()) > 0:
|
if len(char.eveaccount_set.all()) > 0:
|
||||||
name = unicodedata.normalize('NFKD', char.name).encode('ASCII', 'ignore')
|
name = unicodedata.normalize('NFKD', char.name).encode('ASCII', 'ignore')
|
||||||
charname = re.sub('[^a-zA-Z0-9_-]+', '', name)
|
charname = re.sub('[^a-zA-Z0-9_-]+', '', name)
|
||||||
|
if char.eveaccount_set.all()[0].user:
|
||||||
email = char.eveaccount_set.all()[0].user.email
|
email = char.eveaccount_set.all()[0].user.email
|
||||||
out[charname] = email
|
out[charname.lower()] = email
|
||||||
|
|
||||||
|
|
||||||
for key in out:
|
for key in out:
|
||||||
|
|||||||
Reference in New Issue
Block a user