From 4b61c44747939a21467505ae7bb8c9acd884513a Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Fri, 6 Apr 2018 19:46:30 -0300 Subject: [PATCH] Corrige texto_upload_path para subpath nulo --- sapl/utils.py | 3 +++ 1 file changed, 3 insertions(+) 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,