We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 437abe9 commit 3f06040Copy full SHA for 3f06040
apps/downloads/models.py
@@ -361,7 +361,7 @@ class ReleaseFile(ContentManageable, NameSlugModel):
361
362
def validate_unique(self, exclude=None):
363
"""Ensure only one release file per OS has the download button enabled."""
364
- if self.download_button:
+ if self.download_button and self.release_id:
365
qs = ReleaseFile.objects.filter(release=self.release, os=self.os, download_button=True).exclude(pk=self.id)
366
if qs.count() > 0:
367
msg = 'Only one Release File per OS can have "Download button" enabled'
0 commit comments