--- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -171,9 +171,11 @@ Ok(true) } - pub fn check_is_read_only(&self) -> DispatchResult { - if self.read_only { - return Err(>::CollectionNotFound)?; + /// Checks that collection is can be mutate. + /// Now check only `external_collection` flag and if it **true**, than return `CollectionIsReadOnly` error. + pub fn check_is_mutable(&self) -> DispatchResult { + if self.external_collection { + return Err(>::CollectionIsReadOnly)?; } Ok(())