def _process(self): if not self.linked_object or not self.linked_object.can_access( session.user): return jsonify(can_access=False) return jsonify(can_access=True, **reservation_linked_object_data_schema.dump( self.linked_object))
def _process(self): if self.linked_object is None: raise NotFound if not self.linked_object.can_access(session.user): return jsonify(can_access=False) return jsonify(can_access=True, **reservation_linked_object_data_schema.dump( self.linked_object).data)