diff --git a/sapl/utils.py b/sapl/utils.py index 873db5f17..196e5b5cf 100644 --- a/sapl/utils.py +++ b/sapl/utils.py @@ -550,6 +550,9 @@ def texto_upload_path(instance, filename, subpath='', pk_first=False): str_path = ('./sapl/%(prefix)s/%(model_name)s/' '%(pk)s/%(subpath)s/%(filename)s') + if subpath is None: + subpath = '_' + path = str_path %\ { 'prefix': prefix,