Skip to content

Commit

Permalink
Fix guidebook image export for MIVS/MITS
Browse files Browse the repository at this point in the history
The earlier change silently broke guidebook exports for MIVS or MITS teams that don't have a header or thumbnail. This should fix that.
  • Loading branch information
kitsuta committed Dec 3, 2024
1 parent faf3c70 commit f0b6655
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Binary file modified celerybeat-schedule
Binary file not shown.
6 changes: 4 additions & 2 deletions uber/models/mits.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,12 @@ def guidebook_images(self):

header = self.guidebook_header
thumbnail = self.guidebook_thumbnail

prepend = sluggify(self.name) + '_'

return [prepend + header.filename, prepend + thumbnail.filename], [header, thumbnail]
header_name = (prepend + header.filename) if header else ''
thumbnail_name = (prepend + thumbnail.filename) if thumbnail else ''

return [header_name, thumbnail_name], [header, thumbnail]


class MITSPicture(MagModel):
Expand Down
5 changes: 4 additions & 1 deletion uber/models/mivs.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,10 @@ def guidebook_images(self):
thumbnail = self.guidebook_thumbnail
prepend = sluggify(self.title) + '_'

return [prepend + header.filename, prepend + thumbnail.filename], [header, thumbnail]
header_name = (prepend + header.filename) if header else ''
thumbnail_name = (prepend + thumbnail.filename) if thumbnail else ''

return [header_name, thumbnail_name], [header, thumbnail]


class IndieGameImage(MagModel):
Expand Down

0 comments on commit f0b6655

Please sign in to comment.