mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 13:01:50 +02:00
Added another exception for catching errors related to mail
This commit is contained in:
parent
13687c198e
commit
015a00f7a3
3 changed files with 6 additions and 1 deletions
|
@ -377,6 +377,9 @@ class Bill(db.Model):
|
|||
"creation_date": self.creation_date,
|
||||
"what": self.what,
|
||||
"external_link": self.external_link,
|
||||
"original_currency": self.original_currency,
|
||||
"original_amount": self.original_amount,
|
||||
|
||||
}
|
||||
|
||||
def pay_each(self):
|
||||
|
|
|
@ -121,6 +121,8 @@
|
|||
{{ bill.owers|join(', ', 'name') }}
|
||||
{%- endif %}</td>
|
||||
<td>{{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }})</td>
|
||||
<td>{{ bill.original_currency }}</td>
|
||||
<td>{{ bill.original_amount }}</td>
|
||||
<td class="bill-actions">
|
||||
<a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>
|
||||
<a class="delete" href="{{ url_for(".delete_bill", bill_id=bill.id) }}" title="{{ _("delete") }}">{{ _('delete') }}</a>
|
||||
|
|
|
@ -299,7 +299,7 @@ def create_project():
|
|||
)
|
||||
try:
|
||||
current_app.mail.send(msg)
|
||||
except SMTPRecipientsRefused:
|
||||
except (SMTPRecipientsRefused, ConnectionRefusedError):
|
||||
msg_compl = "Problem sending mail. "
|
||||
# TODO: destroy the project and cancel instead?
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue