mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-29 20:43:37 +03:00
Optionally, skip the validation when getting the project
Add flag to enable getting the project information from the storage without performing the validation
This commit is contained in:
parent
2c6f295cc5
commit
c1cd40a811
@ -33,9 +33,14 @@ pub mod commands {
|
||||
pub fn get_project(
|
||||
projects: State<'_, Controller>,
|
||||
id: ProjectId,
|
||||
no_validation: Option<bool>,
|
||||
) -> Result<projects::Project, Error> {
|
||||
if no_validation.unwrap_or(false) {
|
||||
Ok(projects.get(id)?)
|
||||
} else {
|
||||
Ok(projects.get_validated(id)?)
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command(async)]
|
||||
#[instrument(skip(projects, window_state), err(Debug))]
|
||||
|
Loading…
Reference in New Issue
Block a user