Skip to content

Commit

Permalink
fix inline edit template on validation error during create
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Gugger committed Nov 14, 2024
1 parent 26b99ac commit 8be96a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/create_or_edit_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ async fn render_form<E: ActixAdminViewModelTrait>(
let search_params = SearchParams::from_params(&params, view_model);
add_default_context(&mut ctx, req, view_model, entity_name, actix_admin, notifications, &search_params);

let template_path = match view_model.inline_edit {
true => "create_or_edit/inline.html",
false => "create_or_edit.html",
let template_path = match (view_model.inline_edit, model.primary_key.is_some()) {
(true, true) => "create_or_edit/inline.html",
(_, _) => "create_or_edit.html",
};
let body = actix_admin
.tera
Expand Down

0 comments on commit 8be96a9

Please sign in to comment.