def delete(self, dashboard_id): if dashboard_id == '1': return abort(400, detail='cannot delete the main dashboard') dashboard = DBSession.query(Dashboard).filter_by( uid=dashboard_id).one() DBSession.delete(dashboard) return redirect('/dashboard')
def delete(self, uid=None): e_filter = DBSession.query(ExtractionFilter).get(uid) if not e_filter: abort(404) extraction_id = e_filter.extraction_id DBSession.delete(e_filter) return redirect('/extractions/view/%s' % extraction_id)
def delete_extraction(self, dashboard_id): uid = request.json['uid'] try: de = DBSession.query(DashboardExtractionAssociation).filter( DashboardExtractionAssociation.uid == uid, ).one() DBSession.delete(de) except NoResultFound: pass return dict()
def delete(self, uid): extraction = DBSession.query(Extraction).get(uid) or abort(404) DBSession.delete(extraction) flash('Extraction correctly deleted') return redirect(tg.url('/extractions'))
def delete(self, uid=None, **kwargs): step = DBSession.query(ExtractionStep).get(uid) or abort( 404, passthrough='json') DBSession.delete(step) return dict()
def delete(self, uid, **kwargs): dataset = DBSession.query(ExtractionDataSet).filter_by(uid=uid).first() if dataset: DBSession.delete(dataset) return dict()