diff --git a/backend/moonstream/routes/subscriptions.py b/backend/moonstream/routes/subscriptions.py index 3c2959ac..69b021f2 100644 --- a/backend/moonstream/routes/subscriptions.py +++ b/backend/moonstream/routes/subscriptions.py @@ -99,7 +99,6 @@ async def add_subscription_handler( resource_data.update(subscription_data) try: - resource: BugoutResource = bc.create_resource( token=token, application_id=MOONSTREAM_APPLICATION_ID, diff --git a/backend/moonstream/settings.py b/backend/moonstream/settings.py index c524be5a..81f40eae 100644 --- a/backend/moonstream/settings.py +++ b/backend/moonstream/settings.py @@ -5,8 +5,9 @@ from bugout.app import Bugout # Bugout bugout_client = Bugout() -MOONSTREAM_APPLICATION_ID = os.environ.get("MOONSTREAM_APPLICATION_ID") -if MOONSTREAM_APPLICATION_ID is None: +# Default value is "" instead of None so that mypy understands that MOONSTREAM_APPLICATION_ID is a string +MOONSTREAM_APPLICATION_ID = os.environ.get("MOONSTREAM_APPLICATION_ID", "") +if MOONSTREAM_APPLICATION_ID == "": raise ValueError("MOONSTREAM_APPLICATION_ID environment variable must be set") MOONSTREAM_DATA_JOURNAL_ID = os.environ.get("MOONSTREAM_DATA_JOURNAL_ID")