Do not update status of past reservations
-from datetime import time, timedelta
+from datetime import time, timedelta, datetime
from sqlalchemy.orm.exc import NoResultFound
from tensorhive.models.Resource import Resource
@@ -89,6 +89,7 @@ class ReservationVerifier:
"""
reservations = user.get_reservations(include_cancelled=True)
for reservation in reservations:
+ if reservation.end > datetime.utcnow():
if have_users_permissions_increased:
if reservation.is_cancelled and cls.is_reservation_allowed(user, reservation) \
and not reservation.would_interfere():
