fix export edge case

This commit is contained in:
Their Name 2021-12-12 23:21:01 +00:00
parent 4584fefc08
commit a5449b3294

View file

@ -102,7 +102,7 @@ def export_marks_task(user):
for mark in marks:
game = mark.game
title = game.title
summary = ','.join(game.genre) + ' / ' + ','.join(game.platform) + ' / ' + game.release_date.strftime('%Y-%m-%d')
summary = ','.join(game.genre) + ' / ' + ','.join(game.platform) + ' / ' + (game.release_date.strftime('%Y-%m-%d') if game.release_date else '')
tags = ','.join(list(set(map(lambda t: t['content'], game.get_tags_manager().values()))))
world_rating = (game.rating / 2) if game.rating else None
timestamp = mark.edited_time.strftime('%Y-%m-%d %H:%M:%S')