fixed session durations of more than 1 day (#863)

This commit is contained in:
Andreas Egli 2021-05-11 14:57:33 +02:00 committed by GitHub
parent abd5db8ad4
commit 842fdb0b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class UserLoginStageView(StageView):
backend=backend, backend=backend,
) )
delta = timedelta_from_string(self.executor.current_stage.session_duration) delta = timedelta_from_string(self.executor.current_stage.session_duration)
if delta.seconds == 0: if delta.total_seconds() == 0:
self.request.session.set_expiry(0) self.request.session.set_expiry(0)
else: else:
self.request.session.set_expiry(delta) self.request.session.set_expiry(delta)