From a83499b36f68b624fd2d14c08646ad9b5086717f Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Thu, 10 Sep 2020 17:43:35 +0200 Subject: [PATCH] [algorithms][templates] Use file field property to read content Algorithms have properties related to their file fields that does the proper handling for reading their content use that. --- beat/web/algorithms/templates/algorithms/panels/editor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beat/web/algorithms/templates/algorithms/panels/editor.html b/beat/web/algorithms/templates/algorithms/panels/editor.html index 96585f021..bf8ada8c3 100644 --- a/beat/web/algorithms/templates/algorithms/panels/editor.html +++ b/beat/web/algorithms/templates/algorithms/panels/editor.html @@ -246,7 +246,7 @@ {% endwith %}{# groups, uses or parameters #} {% if open_source and not object.is_binary %} - <textarea class="form-control" id="code-display">{{ object.source_code_file.read }}</textarea> + <textarea class="form-control" id="code-display">{{ object.source_code }}</textarea> <p class="help-block">{{ texts.code|safe }}</p> {% elif object.is_binary %} {% if object.valid %} -- GitLab