From 0556b3f75a7f64e354e469f6d307a5168ad92ae0 Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 3 Oct 2020 09:44:06 +0200 Subject: [PATCH] protect plants against old timestamps --- botany.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/botany.py b/botany.py index 6d199c8..cbc881e 100755 --- a/botany.py +++ b/botany.py @@ -237,7 +237,7 @@ class Plant(object): if element['user'] not in visitors_this_check: visitors_this_check.append(element['user']) # prevent users from manually setting watered_time in the future - if element['timestamp'] <= int(time.time()): + if element['timestamp'] <= int(time.time() and element['timestamp'] >= self.watered_timestamp): guest_timestamps.append(element['timestamp']) try: self.update_visitor_db(visitors_this_check)