diff --git a/beat/web/common/models.py b/beat/web/common/models.py
index 34c14ba3d442b6a4791ad41ca2d37ce4f3e6b5c1..324a2f72409ca943bd60ff2cdc60d6cd5b27b1d4 100755
--- a/beat/web/common/models.py
+++ b/beat/web/common/models.py
@@ -41,6 +41,7 @@ from . import storage
 
 from .exceptions import NotUserNorTeam
 from .signals import shared
+from .utils import ensure_string
 
 import os
 import re
@@ -640,7 +641,8 @@ def get_declaration(instance):
 
 
 def get_declaration_string(instance):
-    return storage.get_file_content(instance, 'declaration_file')
+    data = storage.get_file_content(instance, 'declaration_file')
+    return ensure_string(data)
 
 
 #----------------------------------------------------------