Skip to content

Commit

Permalink
Issue #1052 - analysis template version
Browse files Browse the repository at this point in the history
  • Loading branch information
davmlaw committed May 8, 2024
1 parent 9b9fa43 commit c8bde6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions analysis/views/views_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,11 @@ def analysis_template_save(request, pk):
analysis_template = AnalysisTemplate.get_for_user(request.user, pk, write=True)

try:
analysis_template.new_version()
atv = analysis_template.new_version()
return JsonResponse({"version": atv.version})
except ValueError as e:
return JsonResponse({"error": str(e)})

return JsonResponse({"version": analysis_template.version})


@require_POST
def analysis_template_clone(request, pk):
Expand Down

0 comments on commit c8bde6c

Please sign in to comment.