From d97c9db5391197daecf06d2f92cd7028c60148f6 Mon Sep 17 00:00:00 2001 From: Xeniac Date: Sun, 5 Nov 2017 10:22:39 +0100 Subject: [PATCH] Fixed Typer Error "can't compare datetime.datetime to datetime.date". Add a datetime to the hanchan queue instead of an date. --- src/mahjong_ranking/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mahjong_ranking/models.py b/src/mahjong_ranking/models.py index 6a7d589..c1f3afe 100644 --- a/src/mahjong_ranking/models.py +++ b/src/mahjong_ranking/models.py @@ -626,9 +626,9 @@ def update_ranking(sender, instance, **kwargs): instance.player4): LOGGER.debug( "marking %(user)s's kyu/dan for recalculation since %(start)s", - {'user': user, 'start': str(instance.start.date())} + {'user': user, 'start': str(instance.start)} ) - set_dirty(user=user.id, hanchan_date=instance.start.date()) + set_dirty(user=user.id, hanchan_date=instance.start) LOGGER.debug("marking event %s for recalculation.", instance.event) set_dirty(event=instance.event_id, user=user.id) if instance.season: