From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 7 Mar 2023 23:42:23 +0000 (-0800) Subject: Handle the possilbe case of splitting on an empty string returning a list with an... X-Git-Tag: v1.14.0-beta.rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f100198a8a60af378a2c92d8566711de29968bab;p=thirdparty%2Fpaperless-ngx.git Handle the possilbe case of splitting on an empty string returning a list with an empty string --- diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 7b1b600c87..d051a6ebc1 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -84,7 +84,7 @@ def __get_list( string, or the default if the key does not exist """ if key in os.environ: - return os.environ[key].split(sep) + return list(filter(None, os.environ[key].split(sep))) elif default is not None: return default else: