The problem with taiga-manage.sh test_email

mrshandy@david:~/taiga$ ./taiga-manage.sh test_emails mrshandy@yandex.ru
+ exec docker compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage test_emails mrshandy@yandex.ru
[+] Creating 1/0
 ✔ Container taiga-taiga-db-1  Running                                                                                                                                                                                                         0.0s 
Content-Type: multipart/alternative;
 boundary="===============7839360086329168465=="
MIME-Version: 1.0
Subject: You've been Taigatized!
From: system@taiga.io
To: mrshandy@yandex.ru
Date: Sun, 07 Jan 2024 10:06:29 -0000
Message-ID: <170462198919.1.14228046616764466379@b8d28d96d50e>

--===============7839360086329168465==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit




Thank you for registering in Taiga

We're thrilled you've joined our growing community of professionals revolutionizing their way of working and hope you enjoy it.




Please confirm your email: //None/verify-email/None




Have a question? Give us a nudge if you ever need a helping hand, we're at support@taiga.io.
--
The Taiga Team


You may remove your account from this service: //None/cancel-account/cancel-token

--===============7839360086329168465==
Content-Type: text/html; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>You have been Taigatized</title>
        <style type="text/css">.bodyContent a:link {color:#83EEDE;font-weight:normal;text-decoration:underline}
.bodyContent a:visited {color:#83EEDE;font-weight:normal;text-decoration:underline}
.bodyContent a.button:hover {background:#aad400}
.footerContent a:link {color:#FFF;font-weight:bold;text-decoration:underline}
.footerContent a:visited {color:#FFF;font-weight:bold;text-decoration:underline}
@media only screen and (max-width: 480px) {
    .footerContent {
        font-size: 14px;
        line-height: 115%
        }
    .footerContent a {
        display: block
        }
    }
@media only screen and (max-width: 480px) {
    /* /\/\/\/\/\/\/ CLIENT-SPECIFIC MOBILE STYLES /\/\/\/\/\/\/ */
    body, table, td, p, a, li, blockquote {
        -webkit-text-size-adjust: none
        }
    /* Prevent Webkit platforms from changing default text sizes */
    body {
        width: 100%;
        min-width: 100%
        }
    /* Prevent iOS Mail from adding padding to the body */
    /* /\/\/\/\/\/\/ MOBILE RESET STYLES /\/\/\/\/\/\/ */
    #bodyCell {
        padding: 10px
        }
    /* /\/\/\/\/\/\/ MOBILE TEMPLATE STYLES /\/\/\/\/\/\/ */
    /* ======== Page Styles ======== */
    /**
                    * @section template width
                    */
    #templateContainer {
        max-width: 600px;
        /*@editable*/
        width: 100%
        }
    /**
                    * @section heading 1
                    */
    h1 {
        font-size: 18px;
        line-height: 100%
        }
    /**
                    * @section heading 2
                    */
    h2 {
        font-size: 16px;
        line-height: 100%
        }
    /**
                    * @section heading 3
                    */
    h3 {
        font-size: 14px;
        line-height: 100%
        }
    /* ======== Header Styles ======== */
    #templatePreheader {
        display: none
        }
    /* Hide the template preheader to save space */
    /**
                    * @section header image
                    */
    #headerImage {
        height: auto;
        max-width: 600px;
        width: 20%
        }
    /* ======== Body Styles ======== */
    /**
                    * @section body image
                    */
    #bodyImage {
        height: auto;
        max-width: 560px;
        width: 100%
        }
    /**
                    * @section body text
                    */
    .bodyContent {
        font-size: 16px;
        line-height: 125%
        }
    /**
                    * @section body link button class
                    */
    .bodyContent a.button {
        font-size: 14px;
        width: auto
        }
    }</style>
    </head>
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" alink="#83EEDE" link="#83EEDE" bgcolor="#f5f5f5" text="#4C566A" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; margin:0; padding:0; background-color:#f5f5f5; height:100%; width:100%" height="100%" width="100%">
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; margin:0; padding:0; background-color:#f5f5f5; border-collapse:collapse; height:100%; width:100%" bgcolor="#f5f5f5">
                <tr>
                    <td align="center" valign="top" id="bodyCell" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; margin:0; padding:20px; height:100%; width:100%" height="100%" width="100%">
                        <!-- BEGIN TEMPLATE // -->
                        <table border="0" cellpadding="0" cellspacing="0" id="templateContainer" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; width:600px; border:1px solid #CDCDCD; border-collapse:collapse" width="600">
                            <tr>
                                <td align="center" valign="top" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0">
                                    <!-- BEGIN HEADER // -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; border-collapse:collapse">
                                        <tr>
                                            <td valign="top" class="headerContent" style='-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; font-family:"Open Sans", Arial, Helvetica; font-size:14px; margin-bottom:16px; text-align:center; color:#fff; background-color:#008AA8' align="center" bgcolor="#008AA8">
                                                <a href="//None/" title="Taiga" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%">
                                                    <img src="/None:/None/static/emails/logo.png" id="headerImage" alt="Taiga" style="-ms-interpolation-mode:bicubic; border:0; height:auto; line-height:100%; outline:none; text-decoration:none; margin:20px auto; width:80px" height="auto" width="80">
                                                </a>
                                                
                                                <p style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%">Welcome to Taiga, an Open Source, Agile Project Management Tool</p>
                                                
                                            </td>
                                        </tr>
                                    </table>
                                    <!-- // END HEADER -->
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; background-color:#FFF; border-collapse:collapse" bgcolor="#FFFFFF">
                                        <tr>
                                            <td valign="top" class="bodyContent" style='-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; color:#4C566A; font-family:"Open Sans", Arial, Helvetica; font-size:16px; line-height:150%; padding:40px 20px; text-align:center' align="center">
                                                
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table-body" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; border-collapse:collapse">
    <tr>
        <td style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0">
        
            
            <p style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%">Please confirm your email</p>
            <a class="button" href="//None/verify-email/None" title="Confirm email" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; background:#83EEDE; color:#4C566A; display:block; font-weight:600; margin:32px auto; padding:0.8em 3em; text-align:center; text-decoration:none; text-transform:uppercase; width:50%" align="center" width="50%">Confirm email</a>
            
        
        
            <h2 style='display:block; font-family:"Open Sans", Arial; font-size:20px; font-style:normal; font-weight:bold; letter-spacing:normal; line-height:100%; margin-bottom:16px; margin-left:0; margin-right:0; margin-top:0; text-align:center; color:#4C566A' align="center">Thank you for registering in Taiga</h2>
            <p style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%">We're thrilled you've joined our growing community of professionals revolutionizing their way of working and hope you enjoy it.</p>
            <p style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%">Have a question? Give us a nudge if you ever need a helping hand, we're at support@taiga.io.</p>
            <p style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%"><small>The Taiga Team</small></p>
        </td>
        
    </tr>
</table>

                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" valign="top" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0">
                                    

<!-- BEGIN FOOTER // -->
<table border="0" cellpadding="0" cellspacing="0" class="footerContent" width="100%" id="templateFooter" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; background-color:#4C566A; border-collapse:collapse; font-size:14px; line-height:115%" bgcolor="#4C566A">
    <tr>
        <td valign="middle" style='-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; color:#f5f5f5; font-family:"Open Sans", Arial, Helvetica; font-size:10px; line-height:150%; padding-bottom:15px; padding-left:20px; padding-right:17px; padding-top:15px; vertical-align:middle'>
            
                
                <a href="//None/user-settings/mail-notifications" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline">Configure email notifications or unsubscribe</a>
                 • 
                <a href="https://tree.taiga.io/support/" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline">Taiga Support</a>
                 • 
                <a href="mailto:support@taiga.io" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline">Contact us</a>
                
            
        </td>
        
            <td valign="middle" class="social-links" style='-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; mso-table-lspace:0; mso-table-rspace:0; color:#f5f5f5; font-family:"Open Sans", Arial, Helvetica; font-size:10px; line-height:150%; padding-bottom:15px; padding-left:20px; padding-right:17px; padding-top:15px; vertical-align:middle; text-align:right' align="right">
                <a href="https://twitter.com/taigaio" title="Follow us on Twitter" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#9dce0a; font-weight:bold; text-decoration:underline; display:inline-block; margin-left:0.5em"><img src="/None:/None/static/emails/logo-twitter.png" style="-ms-interpolation-mode:bicubic; border:0; height:20px; line-height:100%; outline:none; text-decoration:none; width:auto" height="20" width="auto"></a>
                <a href="https://github.com/kaleidos-ventures" title="Get the code on GitHub" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#9dce0a; font-weight:bold; text-decoration:underline; display:inline-block; margin-left:0.5em"><img src="/None:/None/static/emails/logo-github.png" style="-ms-interpolation-mode:bicubic; border:0; height:20px; line-height:100%; outline:none; text-decoration:none; width:auto" height="20" width="auto"></a>
                <a href="https://taiga.io" title="Visit our website" style="-ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; color:#FFF; font-weight:bold; text-decoration:underline; display:inline-block; margin-left:0.5em"><img src="/None:/None/static/emails/logo-web.png" style="-ms-interpolation-mode:bicubic; border:0; height:20px; line-height:100%; outline:none; text-decoration:none; width:auto" height="20" width="auto"></a>
            </td>
        
    </tr>
</table>
<!-- // END FOOTER -->
                                </td>
                            </tr>
                        </table>
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>

--===============7839360086329168465==--

-------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/taiga-back/manage.py", line 17, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/opt/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/venv/lib/python3.11/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/venv/lib/python3.11/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/taiga-back/taiga/base/management/commands/test_emails.py", line 52, in handle
    membership.invited_by = get_user_model().objects.all().order_by("?").first()
    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'invited_by'

Hi @Shandeika

To run the test_emails, command you need to first load the sample data. Run first ./taiga-manage.sh sampledata to populate the database with some sample content to generate the different emails.

Best regards