浏览代码

fix(api): reversing failed due to missing info on the request

As the request was not processed by rest_framework, there was no
versioning_scheme information present; reversing hence failed and
caused a 500 error after the unlock was successfully commited to
the database.
Nils Wisiol 6 年之前
父节点
当前提交
51fd367387
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/desecapi/views.py

+ 1 - 1
api/desecapi/views.py

@@ -545,7 +545,7 @@ def unlock(request, email):
                 # fail silently, so people can't probe registered addresses
                 # fail silently, so people can't probe registered addresses
                 pass
                 pass
 
 
-            return HttpResponseRedirect(reverse('unlock/done', request=request))
+            return HttpResponseRedirect(reverse('v1:unlock/done', request=request))  # TODO remove dependency on v1
 
 
     # if a GET (or any other method) we'll create a blank form
     # if a GET (or any other method) we'll create a blank form
     else:
     else: