From fba6aedfb3146d811611d57ffd47e7d76d610418 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 15 May 2020 17:04:04 -0700 Subject: [PATCH] Add 'needs_push' field --- fgs/model.py | 1 + fgs/views.py | 1 + 2 files changed, 2 insertions(+) diff --git a/fgs/model.py b/fgs/model.py index 03ee923..e6027f2 100644 --- a/fgs/model.py +++ b/fgs/model.py @@ -85,6 +85,7 @@ class BoundingBox(db.Model): id = db.Column(db.Integer, primary_key=True) collar_id = db.Column(db.Integer, db.ForeignKey('collar.id')) num_points = db.Column(db.Integer) + needs_push = db.Column(db.Boolean) coord0x = db.Column(db.Float(precision=10)) coord0y = db.Column(db.Float(precision=10)) coord1x = db.Column(db.Float(precision=10)) diff --git a/fgs/views.py b/fgs/views.py index b8039d0..61913e2 100644 --- a/fgs/views.py +++ b/fgs/views.py @@ -164,6 +164,7 @@ def collar_set_boundary(id): if collar is None: abort(404) new_boundary = flatten(request.json) + new_boundary.needs_push = True if collar.boundary is not None: db.session.delete(collar.boundary) collar.boundary = new_boundary