1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Default to now() for Date

This commit is contained in:
Mike Varga 2022-10-17 13:12:23 -04:00
parent 6673c58ca4
commit f065d60f54

View file

@ -384,6 +384,8 @@ class Mailbox(models.Model):
msg.timestamp = parser.parse(message["date"])
elif "Date" in message:
msg.timestamp = parser.parse(message["Date"])
else:
msg.timestamp = now()
if Message.objects.filter(message_id=msg.message_id).count() != 0: