Skip to content
Snippets Groups Projects

Refactor update creation api

Merged Samuel GAIST requested to merge refactor_update_creation_api into master
All threads resolved!
1 file
+ 8
7
Compare changes
  • Side-by-side
  • Inline
@@ -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) || '',
Loading