Skip to content
Snippets Groups Projects
Commit 0339f2b2 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

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

parent cc789866
No related branches found
No related tags found
1 merge request!327Refactor update creation api
......@@ -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) || '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment