rascunho

commit 4feecfbc7d847d6560f04477464a104a5851ccaa

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

documents: disallow creating frontmatter via form or API

 rascunho/blueprints/api.py | 1 +
 rascunho/blueprints/basic.py | 1 +


diff --git a/rascunho/blueprints/api.py b/rascunho/blueprints/api.py
index 1edecc9851c5358d76068bda4eec292465a6c3c6..956d5600b781b23f61d946e3d3d348efa48eedba 100644
--- a/rascunho/blueprints/api.py
+++ b/rascunho/blueprints/api.py
@@ -29,6 +29,7 @@         doc = Document()
 
     doc.sha = sha.hexdigest()
     doc.content = content
+    doc.frontmatter = False
 
     db.add(doc)
     db.commit()




diff --git a/rascunho/blueprints/basic.py b/rascunho/blueprints/basic.py
index df270500416e8589c47576521ca98e4567f75327..a5a51a116d4be56f88850fe565ab8ee34caa9f07 100644
--- a/rascunho/blueprints/basic.py
+++ b/rascunho/blueprints/basic.py
@@ -51,6 +51,7 @@         doc = Document()
 
     doc.sha = sha.hexdigest()
     doc.content = content
+    doc.frontmatter = False
 
     db.add(doc)
     db.commit()