Fix an issue where non super users would not be able to update a job

template survey spec
This commit is contained in:
Matthew Jones
2015-01-23 10:34:41 -05:00
parent ea8537ac71
commit 6a7e887369

View File

@@ -1503,7 +1503,7 @@ class JobTemplateSurveySpec(GenericAPIView):
def post(self, request, *args, **kwargs):
obj = self.get_object()
if not request.user.can_access(self.model, 'change', obj, request.DATA):
if not request.user.can_access(self.model, 'change', obj, None):
raise PermissionDenied()
try:
obj.survey_spec = json.dumps(request.DATA)