Add 'needs_push' field
This commit is contained in:
parent
4976cd8b93
commit
fba6aedfb3
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user