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

[code][models] Ensure binary read is used when handling a CXX instance

It is done so currently as Databases are not Code contributions
since they have no owner.
parent 60f7a86a
No related branches found
No related tags found
2 merge requests!358File field reading,!342Django 3 migration
...@@ -221,7 +221,10 @@ def set_source_code(instance, value): ...@@ -221,7 +221,10 @@ def set_source_code(instance, value):
def get_source_code(instance): 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)
# ---------------------------------------------------------- # ----------------------------------------------------------
......
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