summaryrefslogtreecommitdiffstatshomepage
path: root/vk/tracking/sessions.py
diff options
context:
space:
mode:
Diffstat (limited to 'vk/tracking/sessions.py')
-rw-r--r--vk/tracking/sessions.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/vk/tracking/sessions.py b/vk/tracking/sessions.py
index 6c4e787..5d545f1 100644
--- a/vk/tracking/sessions.py
+++ b/vk/tracking/sessions.py
@@ -57,13 +57,11 @@ class OnlineSessionEnumerator(MutableMapping):
if self._time_from is not None:
if ended_at < self._time_from:
return None
- if started_at < self._time_from:
- started_at = self._time_from
+ started_at = max(started_at, self._time_from)
if self._time_to is not None:
if started_at > self._time_to:
return None
- if ended_at > self._time_to:
- ended_at = self._time_to
+ ended_at = min(ended_at, self._time_to)
return user, started_at, ended_at
def read_database(self, db_reader):