diff --git a/packages/app-lib/src/state/cache.rs b/packages/app-lib/src/state/cache.rs index 0e461843e3..414e9ec04e 100644 --- a/packages/app-lib/src/state/cache.rs +++ b/packages/app-lib/src/state/cache.rs @@ -890,17 +890,6 @@ impl CachedEntry { } } - remaining_keys.retain(|x| { - x != &&*row.id - && !row.alias.as_ref().is_some_and(|y| { - if type_.case_sensitive_alias().unwrap_or(true) { - x == y - } else { - y.to_lowercase() == x.to_lowercase() - } - }) - }); - if let Some(data) = parsed_data { if data.get_type() != type_ { return Err(crate::ErrorKind::OtherError(format!( @@ -912,6 +901,18 @@ impl CachedEntry { .as_error()); } + remaining_keys.retain(|x| { + x != &&*row.id + && !row.alias.as_ref().is_some_and(|y| { + if type_.case_sensitive_alias().unwrap_or(true) + { + x == y + } else { + y.to_lowercase() == x.to_lowercase() + } + }) + }); + return_vals.push(Self { id: row.id, alias: row.alias,