diff options
Diffstat (limited to 'cli/app/controllers/page_controller.py')
| -rw-r--r-- | cli/app/controllers/page_controller.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/app/controllers/page_controller.py b/cli/app/controllers/page_controller.py index 5263cf0..d393625 100644 --- a/cli/app/controllers/page_controller.py +++ b/cli/app/controllers/page_controller.py @@ -11,5 +11,11 @@ class PageView(CrudView): model = Page form = PageForm + def where(self, query, args): + graph_id = args.get('graph_id', default=None) + if graph_id is not None: + query = query.where(Page.graph_id == int(graph_id)) + return query + def on_destroy(self, session, item): session.query(Tile).filter(Tile.page_id == item.id).delete(synchronize_session=False) |
