From cd24a66ece8b505a016b5821cb41b6777c799b2b Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Fri, 03 Jun 2022 13:34:00 +0000 Subject: [PATCH] CORE-390 Fix error returned --- --- 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(()) -- gitstuff