[inactive-gitlab-users] Some e-mails have an empty string set for unconfirmed emails
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [inactive-gitlab-users] Some e-mails have an empty string set for unconfirmed emails
- Date: Wed, 8 Dec 2021 21:11:56 +0000 (UTC)
commit 8b6d7a31fce5a4ce29d39caaf1b9fe110cf8717c
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Wed Dec 8 22:11:27 2021 +0100
Some e-mails have an empty string set for unconfirmed emails
inactive-gitlab-users.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/inactive-gitlab-users.py b/inactive-gitlab-users.py
index 632ceb7..f117b6f 100644
--- a/inactive-gitlab-users.py
+++ b/inactive-gitlab-users.py
@@ -62,7 +62,8 @@ def is_user_trusted(user):
user.customattributes.set("trusted", "true")
return True
- confirmed_emails = [x for x in user.emails.list() if x.confirmed_at or len(x.confirmed_at) > 0]
+ confirmed_emails = [x for x in user.emails.list() if x.confirmed_at]
+ confirmed_emails = [x for x in confirmed_emails if len(x.confirmed_at) > 0]
if len(confirmed_emails) >= 2:
user.customattributes.set("trusted", "true")
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]