aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-10-06 15:44:29 -0500
committerGitHub2020-10-06 15:44:29 -0500
commit527b836c549d2977ff3dafad069b470e7b78040a (patch)
treee400a04d4ec0dc80de9d7f824cd8e7660958e85f /wqflask
parent376cca4010aa925a20702ccbf5860f956314c840 (diff)
parent2583c3347f0f5a655df6c095a5162dc8d49c4fde (diff)
downloadgenenetwork2-527b836c549d2977ff3dafad069b470e7b78040a.tar.gz
Merge pull request #454 from zsloan/update_docs_fix
Made change that should fix error when trying to change page text usiā€¦
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/docs.py4
-rw-r--r--wqflask/wqflask/views.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py
index 78407e22..9fad1cf1 100644
--- a/wqflask/wqflask/docs.py
+++ b/wqflask/wqflask/docs.py
@@ -11,7 +11,7 @@ class Docs(object):
def __init__(self, entry, start_vars={}):
sql = """
- SELECT Docs.title, Docs.content
+ SELECT Docs.title, CAST(Docs.content AS BINARY)
FROM Docs
WHERE Docs.entry LIKE %s
"""
@@ -22,7 +22,7 @@ class Docs(object):
self.content = ""
else:
self.title = result[0]
- self.content = result[1].encode("latin1")
+ self.content = result[1]
self.editable = "false"
# ZS: Removing option to edit to see if text still gets vandalized
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 42a10c7a..94ec7137 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -50,7 +50,7 @@ from wqflask.search_results import SearchResultPage
from wqflask.export_traits import export_search_results_csv
from wqflask.gsearch import GSearch
from wqflask.update_search_results import GSearch as UpdateGSearch
-from wqflask.docs import Docs
+from wqflask.docs import Docs, update_text
from wqflask.db_info import InfoPage
from utility import temp_data
@@ -350,7 +350,7 @@ def environments():
@app.route("/update_text", methods=('POST',))
def update_page():
- docs.update_text(request.form)
+ update_text(request.form)
doc = Docs(request.form['entry_type'], request.form)
return render_template("docs.html", **doc.__dict__)