]> git.ipfire.org Git - pbs.git/commitdiff
users: Don't fail if we don't have an email address for a user
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 Mar 2023 15:40:54 +0000 (15:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 Mar 2023 15:40:54 +0000 (15:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/users.py

index 65d089482099cf379aef832118380e9a8616ca2b..047106d234b592115a8081b413a76f60fa16de58 100644 (file)
@@ -355,7 +355,7 @@ class User(base.DataObject):
                """
                        The name/email address of the user in MIME format
                """
-               return email.utils.formataddr((self.name, self.email))
+               return email.utils.formataddr((self.name, self.email or "invalid@invalid.tld"))
 
        def send_email(self, *args, **kwargs):
                return self.backend.messages.send_template(