def add_parent_classifier(self): classifier = Classifier(classifier=self.request.params.get("parent"), l3=0, l4=0, l5=0) self.request.db.add(classifier) self.request.db.flush() # To get the ID classifier.l2 = classifier.id self.request.session.flash( f"Added classifier {classifier.classifier!r}", queue="success") return HTTPSeeOther(self.request.route_path("admin.classifiers"))
def add_parent_classifier(self): classifier = Classifier( classifier=self.request.params.get('parent'), l3=0, l4=0, l5=0, ) self.request.db.add(classifier) self.request.db.flush() # To get the ID classifier.l2 = classifier.id self.request.session.flash( f'Added classifier {classifier.classifier!r}', queue='success', ) return HTTPSeeOther(self.request.route_path('admin.classifiers'))
def add_parent_classifier(self): classifier = Classifier( classifier=self.request.params.get('parent'), l3=0, l4=0, l5=0, ) self.request.db.add(classifier) self.request.db.flush() # To get the ID classifier.l2 = classifier.id self.request.session.flash( f'Successfully added classifier {classifier.classifier!r}', queue='success', ) return HTTPSeeOther(self.request.route_path('admin.classifiers'))