Merge pull request #40 from tilde-team/master

fix visiting
pull/50/head
Jake Funke 2022-10-12 12:15:42 -07:00 committed by GitHub
commit bdfb113063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ class Plant(object):
if element['user'] not in visitors_this_check: if element['user'] not in visitors_this_check:
visitors_this_check.append(element['user']) visitors_this_check.append(element['user'])
# prevent users from manually setting watered_time in the future # prevent users from manually setting watered_time in the future
if element['timestamp'] <= int(time.time() and element['timestamp'] >= self.watered_timestamp): if element['timestamp'] <= int(time.time()) and element['timestamp'] >= self.watered_timestamp:
guest_timestamps.append(element['timestamp']) guest_timestamps.append(element['timestamp'])
try: try:
self.update_visitor_db(visitors_this_check) self.update_visitor_db(visitors_this_check)