From 801b50cb5bddbf8c15493046f54207d5ce192498 Mon Sep 17 00:00:00 2001 From: Leigh Morresi <275001+dgtlmoon@users.noreply.github.com> Date: Tue, 2 Feb 2021 12:02:13 +0100 Subject: [PATCH] Version comparison had the wrong order --- backend/backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/backend.py b/backend/backend.py index 85dce37f..06876c47 100644 --- a/backend/backend.py +++ b/backend/backend.py @@ -191,7 +191,7 @@ def diff_history_page(uuid): left_file_contents = right_file_contents = "" - l_file = watch['history'][str(dates[-1])] + l_file = watch['history'][str(dates[1])] with open(l_file, 'r') as f: left_file_contents = f.read() @@ -200,7 +200,7 @@ def diff_history_page(uuid): r_file = watch['history'][str(previous_version)] except KeyError: # Not present, use a default value - r_file = watch['history'][str(dates[-2])] + r_file = watch['history'][dates[0]] with open(r_file, 'r') as f: right_file_contents = f.read()