summaryrefslogtreecommitdiff
path: root/cli/app/controllers/tile_controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/controllers/tile_controller.py')
-rw-r--r--cli/app/controllers/tile_controller.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/app/controllers/tile_controller.py b/cli/app/controllers/tile_controller.py
index c47237b..fc36943 100644
--- a/cli/app/controllers/tile_controller.py
+++ b/cli/app/controllers/tile_controller.py
@@ -9,3 +9,12 @@ from app.controllers.crud_controller import CrudView
class TileView(CrudView):
model = Tile
form = TileForm
+
+ def where(self, query, args):
+ graph_id = args.get('graph_id', default=None)
+ if graph_id is not None:
+ query = query.where(Tile.graph_id == int(graph_id))
+ page_id = args.get('page_id', default=None)
+ if page_id is not None:
+ query = query.where(Tile.page_id == int(page_id))
+ return query