def send_messages(self, email_messages):
        for message in email_messages:
            email = Email.objects.create(
                from_email = message.from_email % u'%s',
                to_emails = u', '.join(message.to),
                cc_emails = u', '.join(message.cc),
                bcc_emails = u', '.join(message.bcc),
                all_recipients = u', '.join(message.recipients()),
                subject = u'%s' % message.subject,
                body = u'%s' % message.body,
                raw = u'%s' % smart_unicode(message.message().as_string())
            )
            for attachment in message.attachments:
                if isinstance(attachment, tuple):
                    filename, content, mimetype = attachment
                elif isinstance(attachment, MIMEBase):
                    filename = attachment.get_filename()
                    content = attachment.get_payload(decode=True)
                    mimetype = None
                else:
                    continue
                Attachment.objects.create(
                    email=email,
                    filename=filename,
                    content=content,
                    mimetype=mimetype
                )
        return len(email_messages)
dataset/ETHPy150Open stefanfoulis/django-database-email-backend/database_email_backend/backend.py/DatabaseEmailBackend.send_messages/swapped operands of `%`