diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-01 18:34:00 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-01 18:34:00 +0200 |
| commit | 288694ae9a61c59dba91e2357fa7785d95a51341 (patch) | |
| tree | b20e1984ac881fa194fd26b19cfa8ee483ed000e /cli/app/controllers/tile_controller.py | |
| parent | 1a7370c19a7eed6a5f0f48e270092f9b3caebbc1 (diff) | |
forms
Diffstat (limited to 'cli/app/controllers/tile_controller.py')
| -rw-r--r-- | cli/app/controllers/tile_controller.py | 9 |
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 |
