Finally fix the editor!

This commit is contained in:
Gregory Schier
2023-03-31 15:56:35 -07:00
parent 3c517e0739
commit 4feb31390d
4 changed files with 70 additions and 80 deletions

View File

@@ -215,7 +215,9 @@ async fn actually_send_ephemeral_request(
response = models::update_response_if_id(response, pool)
.await
.expect("Failed to update response");
emit_side_effect(app_handle, "updated_model", &response);
if request.id != "" {
emit_side_effect(app_handle, "updated_model", &response);
}
Ok(response)
}
Err(e) => response_err(response, e.to_string(), app_handle, pool).await,