fix is_subbed: call without uid

This commit is contained in:
Semjon Kerner 2021-03-26 12:19:09 +01:00
parent 7656aecea0
commit 79445b33f0
2 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,7 @@ def start_semifisher_config(gui: 'GUI'):
gui.config.save_config() gui.config.save_config()
def toggle_sub(): def toggle_sub():
if web.is_subbed(config.get("uid"))[0]: if web.is_subbed()[0]:
if web.unsub(): if web.unsub():
gui._notify.set(0) gui._notify.set(0)
else: else:

View File

@ -62,6 +62,9 @@ def send_notification(message):
@uses_session @uses_session
@fallback(None) @fallback(None)
def send_hole_deplete(fish_caught, hole_time, fish_times): def send_hole_deplete(fish_caught, hole_time, fish_times):
if not is_subbed():
return False
hole_data = { hole_data = {
"fish_caught": fish_caught, "fish_caught": fish_caught,
"hole_time": hole_time, "hole_time": hole_time,