浏览代码

fix(api): updated to meet new django API

Nils Wisiol 8 年之前
父节点
当前提交
aa83935ffd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/desecapi/views.py

+ 1 - 1
api/desecapi/views.py

@@ -154,7 +154,7 @@ class DynDNS12Update(APIView):
 
             # 5. only domain associated with this user account
             if len(request.user.domains.all()) == 1:
-                return request.user.domains[0].name
+                return request.user.domains.all()[0].name
 
             return None