summaryrefslogtreecommitdiff
path: root/cli/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-06-11 00:35:30 +0200
committerJules Laplace <julescarbon@gmail.com>2020-06-11 00:35:30 +0200
commiteb5136e2023fb0999995befff60624d5d4c51c94 (patch)
tree6129655ffca1afdcfedca826c1d47609e6292b69 /cli/app
parent9a1cac006a80098f90f2febf751632c7e5ffbfa0 (diff)
fixing bugs
Diffstat (limited to 'cli/app')
-rw-r--r--cli/app/controllers/page_controller.py2
-rw-r--r--cli/app/sql/models/page.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/cli/app/controllers/page_controller.py b/cli/app/controllers/page_controller.py
index 587c61d..236b6f8 100644
--- a/cli/app/controllers/page_controller.py
+++ b/cli/app/controllers/page_controller.py
@@ -20,6 +20,8 @@ class PageView(CrudView):
def on_create(self, session, form, item):
item.settings = form['settings']
+ if form['description'] is None or item.description is None:
+ item.description = ''
item.graph_id = int(form['graph_id'])
def on_update(self, session, form, item):
diff --git a/cli/app/sql/models/page.py b/cli/app/sql/models/page.py
index 4ca758d..2f7065b 100644
--- a/cli/app/sql/models/page.py
+++ b/cli/app/sql/models/page.py
@@ -51,6 +51,6 @@ class Page(Base):
class PageForm(ModelForm):
class Meta:
model = Page
- exclude = ['settings', 'created_at', 'updated_at']
+ exclude = ['description', 'settings', 'created_at', 'updated_at']
def get_session():
return Session()