Fix bad download file names

Fixes #116
This commit is contained in:
rubenwardy
2021-05-04 22:06:31 +01:00
parent f4792ac537
commit e9161610c4
2 changed files with 10 additions and 4 deletions

View File

@@ -872,6 +872,9 @@ class PackageRelease(db.Model):
def __init__(self):
self.releaseDate = datetime.datetime.now()
def getDownloadFileName(self):
return f"{self.package.name}_{self.id}.zip"
def approve(self, user):
if not self.checkPerm(user, Permission.APPROVE_RELEASE):
return False