git.delta.rocks / unique-network / refs/commits / cd24a66ece8b

difftreelog

CORE-390 Fix error returned

Trubnikov Sergey2022-06-03parent: #97c58c0.patch.diff
in: master

1 file changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
171 Ok(true)171 Ok(true)
172 }172 }
173173
174 /// Checks that collection is can be mutate.
175 /// Now check only `external_collection` flag and if it **true**, than return `CollectionIsReadOnly` error.
174 pub fn check_is_read_only(&self) -> DispatchResult {176 pub fn check_is_mutable(&self) -> DispatchResult {
175 if self.read_only {177 if self.external_collection {
176 return Err(<Error<T>>::CollectionNotFound)?;178 return Err(<Error<T>>::CollectionIsReadOnly)?;
177 }179 }
178180
179 Ok(())181 Ok(())