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
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class Expense(CampRelatedModel, UUIDModel):
subject="Expense %s for %s" % (self.pk, self.camp.title),
to_recipients=[settings.ACCOUNTINGSYSTEM_EMAIL],
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