def delete(self):
        """ Easy delete for db models """
        try:
            if self.exists() is False:
                return None
            self.db.session.delete(self)
            self.db.session.commit()
        except (Exception, BaseException) as error:
            # fail silently
            return None
def delete ( self ) : try : if self . exists ( ) is False : return None self . db . session . delete ( self ) self . db . session . commit ( ) except ( Exception , BaseException ) as error : return None
Easy delete for db models