def get_record(cls, id_, with_deleted=False): """Get record instance. Raises database exception if record does not exists. """ with db.session.no_autoflush: obj = workflow_object_class.get(id_) return cls(cls.record_from_object(obj), workflow=obj)
def details(objectid): """Display info about the object.""" try: workflow_object = workflow_object_class.get(objectid) except WorkflowsMissingObject: abort(404) return render_template( current_app.config['WORKFLOWS_UI_DETAILS_TEMPLATE'], workflow_object=workflow_object, )
def details(objectid): """Display info about the object.""" if not admin_permission_factory().can(): abort(403) try: workflow_object = workflow_object_class.get(objectid) except WorkflowsMissingObject: abort(404) return render_template( current_app.config['WORKFLOWS_UI_DETAILS_TEMPLATE'], workflow_object=workflow_object, )