From 463b2d044953e7e5cc2cc374ca21a7eeab1e2f3b Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 12 May 2023 15:41:00 +0200 Subject: [PATCH] BrowserSteps - adding setup check --- changedetectionio/blueprint/browser_steps/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/changedetectionio/blueprint/browser_steps/__init__.py b/changedetectionio/blueprint/browser_steps/__init__.py index d2039800..931d8bbd 100644 --- a/changedetectionio/blueprint/browser_steps/__init__.py +++ b/changedetectionio/blueprint/browser_steps/__init__.py @@ -104,10 +104,13 @@ def construct_blueprint(datastore: ChangeDetectionStore): # A new session was requested, return sessionID import uuid - browsersteps_session_id = str(uuid.uuid4()) + global browsersteps_sessions + browsersteps_session_id = str(uuid.uuid4()) watch_uuid = request.args.get('uuid') - global browsersteps_sessions + + if not watch_uuid: + return make_response('No Watch UUID specified', 500) print("Starting connection with playwright") logging.debug("browser_steps.py connecting")