Use environment variable if parsed cli arg is None

This commit is contained in:
Andrei Betlen 2023-05-08 14:20:53 -04:00
parent 0d751a69a7
commit 022e9ebcb8

View file

@ -40,7 +40,7 @@ if __name__ == "__main__":
)
args = parser.parse_args()
settings = Settings(**vars(args))
settings = Settings(**{k: v for k, v in vars(args).items() if v is not None})
app = create_app(settings=settings)
uvicorn.run(