only use base filename, not full path lol

This commit is contained in:
Thomas Steen Rasmussen 2018-08-30 17:31:43 +02:00
parent b753d05b5c
commit 435f95b70b

View file

@ -103,7 +103,7 @@ class Expense(CampRelatedModel, UUIDModel):
subject="Expense %s for %s" % (self.pk, self.camp.title), subject="Expense %s for %s" % (self.pk, self.camp.title),
to_recipients=[settings.ACCOUNTINGSYSTEM_EMAIL], to_recipients=[settings.ACCOUNTINGSYSTEM_EMAIL],
attachment=self.invoice.read(), attachment=self.invoice.read(),
attachment_filename=self.invoice.file.name, attachment_filename=os.path.basename(self.invoice.file.name),
) )
# Add email which will be sent to the user who entered the expense # Add email which will be sent to the user who entered the expense