diff --git a/pallets/poscan/src/lib.rs b/pallets/poscan/src/lib.rs index fff0ddde..6f479292 100644 --- a/pallets/poscan/src/lib.rs +++ b/pallets/poscan/src/lib.rs @@ -401,7 +401,10 @@ pub mod pallet { let compressed_obj: BoundedVec> = compress_with.compress(obj.to_vec()).try_into().unwrap(); - for (_idx, obj_data) in Objects::::iter() { + for (_idx, obj_data) + in Objects::::iter().filter( + |obj| !matches!(obj.1.state, ObjectState::NotApproved(_)) + ) { match obj_data.compressed_with { None if obj_data.obj == obj => { return Err(Error::::ObjectExists.into());