in import_mapping() do not fail on None
This commit is contained in:
parent
4ca053c3ce
commit
227c0de8c5
|
@ -11,7 +11,7 @@ from mandaye.exceptions import ImproperlyConfigured
|
|||
# TODO: add an external url mapping
|
||||
|
||||
def import_mapping(path):
|
||||
if not '.' in path:
|
||||
if not path or not '.' in path:
|
||||
return path
|
||||
i = path.rfind('.')
|
||||
module, attr = path[:i], path[i+1:]
|
||||
|
|
Reference in New Issue