rascunho

commit d3b7f284036778e26f5b3445e42571815335f4c6

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Fetch first document

 core/blueprints/basic.py | 2 +-


diff --git a/core/blueprints/basic.py b/core/blueprints/basic.py
index 89d473f9d1b7416eb8523d3dc26b623c8d5ea47f..9f4375fd32911f582673960d12df63e8326e729e 100644
--- a/core/blueprints/basic.py
+++ b/core/blueprints/basic.py
@@ -8,7 +8,7 @@
 @basic.route("/", methods = ['GET', 'POST'])
 def index():
     if request.method == "GET":
-        doc = Document.query.first()
+        doc = Document.query.order_by(Document.created_at.asc()).first()
         return render_template('index.html', doc = doc)
     else:
         return create(request.form)