Merge pull request #1369 from SkynetLabs/airtable-env-vars
Remove Airtable hardcoded default values
This commit is contained in:
commit
f3279e959f
|
@ -0,0 +1,2 @@
|
|||
- Remove hardcoded Airtable default values from blocklist script. Portal
|
||||
operators need to define their own values in portal common config (LastPass).
|
|
@ -6,6 +6,7 @@ from time import sleep
|
|||
|
||||
import traceback
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import asyncio
|
||||
import requests
|
||||
|
@ -13,10 +14,16 @@ import json
|
|||
|
||||
setup()
|
||||
|
||||
|
||||
AIRTABLE_API_KEY = os.getenv("AIRTABLE_API_KEY")
|
||||
AIRTABLE_BASE = os.getenv("AIRTABLE_BASE", "app89plJvA9EqTJEc")
|
||||
AIRTABLE_TABLE = os.getenv("AIRTABLE_TABLE", "Table%201")
|
||||
AIRTABLE_FIELD = os.getenv("AIRTABLE_FIELD", "Link")
|
||||
AIRTABLE_BASE = os.getenv("AIRTABLE_BASE")
|
||||
AIRTABLE_TABLE = os.getenv("AIRTABLE_TABLE")
|
||||
AIRTABLE_FIELD = os.getenv("AIRTABLE_FIELD")
|
||||
|
||||
# Check environment variables are defined
|
||||
for value in [AIRTABLE_API_KEY, AIRTABLE_BASE, AIRTABLE_TABLE, AIRTABLE_FIELD]:
|
||||
if not value:
|
||||
sys.exit("Configuration error: Missing AirTable environment variable.")
|
||||
|
||||
|
||||
async def run_checks():
|
||||
|
|
Reference in New Issue