Main: Make EXPORT_OPENAPI only work if true or 1

Use truthy values instead of checking if the variable is set.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2024-07-08 12:50:49 -04:00
parent e58e197f0b
commit a59e8ef9e7

View file

@ -29,7 +29,7 @@ async def entrypoint(args: Optional[dict] = None):
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
if os.getenv("EXPORT_OPENAPI"):
if os.getenv("EXPORT_OPENAPI").lower() in ("true", "1"):
openapi_json = export_openapi()
async with aiofiles.open("openapi.json", "w") as f: