🐛 fix(main.py): fix condition to setup static files only if static_files_dir is not None

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-07 12:08:16 -03:00
commit 96dfb9b324

View file

@ -81,7 +81,7 @@ def setup_app(
if not backend_only and (not static_files_dir or not static_files_dir.exists()):
raise RuntimeError(f"Static files directory {static_files_dir} does not exist.")
app = create_app()
if not backend_only:
if not backend_only and static_files_dir is not None:
setup_static_files(app, static_files_dir)
return app