def _process_args(self): RHContributionDisplayBase._process_args(self) self.editable_type = EditableType[request.view_args['type']] self.editable = (Editable.query .with_parent(self.contrib) .filter_by(type=self.editable_type) .first())
def _process_args(self): RHContributionDisplayBase._process_args(self) self.editable_type = EditableType[request.view_args['type']] self.editable = (Editable.query.with_parent( self.contrib).filter_by(type=self.editable_type).options( *self._editable_query_options).first()) if self.editable is None and self.EDITABLE_REQUIRED: raise NotFound