Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/downloads/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class ReleaseFile(ContentManageable, NameSlugModel):

def validate_unique(self, exclude=None):
"""Ensure only one release file per OS has the download button enabled."""
if self.download_button:
if self.download_button and self.release_id:
qs = ReleaseFile.objects.filter(release=self.release, os=self.os, download_button=True).exclude(pk=self.id)
if qs.count() > 0:
msg = 'Only one Release File per OS can have "Download button" enabled'
Expand Down