Commit 0339f2b2 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[algorithms][templates][edition] Fix data handling in data generation

parent cc789866
......@@ -329,13 +329,14 @@ function setupEditor(algorithm, dataformats, libraries)
var data = {
{% if not edition %}
{% if algorithm_version > 1 and not fork_of %}
name: '{{ algorithm_name }}',
version: '{{ algorithm_version }}',
previous_version:'{{ algorithm_author }}/{{ algorithm_name }}/{{ algorithm_version|add:-1 }}',
{% else %}
name: $('#algorithm_name')[0].value.trim(),
{% endif %}
{% if algorithm_version > 1 and not fork_of %}
name: '{{ algorithm_name }}',
version: {{ algorithm_version }},
previous_version:'{{ algorithm_author }}/{{ algorithm_name }}/{{ algorithm_version|add:-1 }}',
{% else %}
name: $('#algorithm_name')[0].value.trim(),
version: 1,
{% endif %}
description: (algorithm && algorithm.description) || '',
{% endif %}
short_description: (algorithm && algorithm.short_description) || '',
......
Supports Markdown
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