From c1cd40a8113bf6bd27d07e7563bb353494d08c34 Mon Sep 17 00:00:00 2001 From: estib Date: Mon, 2 Sep 2024 17:39:40 +0200 Subject: [PATCH] Optionally, skip the validation when getting the project Add flag to enable getting the project information from the storage without performing the validation --- crates/gitbutler-tauri/src/projects.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/gitbutler-tauri/src/projects.rs b/crates/gitbutler-tauri/src/projects.rs index 491e9f5ed..d2aab3288 100644 --- a/crates/gitbutler-tauri/src/projects.rs +++ b/crates/gitbutler-tauri/src/projects.rs @@ -33,8 +33,13 @@ pub mod commands { pub fn get_project( projects: State<'_, Controller>, id: ProjectId, + no_validation: Option, ) -> Result { - Ok(projects.get_validated(id)?) + if no_validation.unwrap_or(false) { + Ok(projects.get(id)?) + } else { + Ok(projects.get_validated(id)?) + } } #[tauri::command(async)]