Commit a45cb1d3 authored by Valentin Samir's avatar Valentin Samir

Typo, bad variable name

parent 851f32bf
...@@ -38,7 +38,7 @@ def JsonResponse(request, data): ...@@ -38,7 +38,7 @@ def JsonResponse(request, data):
def import_attr(path): def import_attr(path):
"""transform a python module.attr path to the attr""" """transform a python module.attr path to the attr"""
if not isinstance(path, str): if not isinstance(path, str):
return string return path
if "." not in path: if "." not in path:
ValueError("%r should be of the form `module.attr` and we just got `attr`" % path) ValueError("%r should be of the form `module.attr` and we just got `attr`" % path)
module, attr = path.rsplit('.', 1) module, attr = path.rsplit('.', 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment