diff --git a/beat/web/code/models.py b/beat/web/code/models.py index 301baa035887c7b93517e2302fbd79fec4dee0cd..57f6c5116ba1c66314e9a9debf982bd00752f992 100755 --- a/beat/web/code/models.py +++ b/beat/web/code/models.py @@ -221,7 +221,10 @@ def set_source_code(instance, value): def get_source_code(instance): - return storage.get_file_content(instance, "source_code_file") + binary = False + if isinstance(instance, Code): + binary = instance.is_binary() + return storage.get_file_content(instance, "source_code_file", binary) # ----------------------------------------------------------