Update create_or_edit_post.rs
This commit is contained in:
parent
270fe7fee1
commit
d6795a3725
@ -125,7 +125,7 @@ pub async fn create_or_edit_post<E: ActixAdminViewModelTrait>(
|
|||||||
.finish())
|
.finish())
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
#[cfg(enable_tracing)]
|
#[cfg(enable-tracing)]
|
||||||
tracing::error!("{e}");
|
tracing::error!("{e}");
|
||||||
errors.push(e);
|
errors.push(e);
|
||||||
render_form::<E>(
|
render_form::<E>(
|
||||||
@ -187,7 +187,7 @@ async fn render_form<E: ActixAdminViewModelTrait>(
|
|||||||
let notifications: Vec<ActixAdminNotification> = errors
|
let notifications: Vec<ActixAdminNotification> = errors
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|err| {
|
.map(|err| {
|
||||||
#[cfg(enable_tracing)]
|
#[cfg(enable-tracing)]
|
||||||
tracing::error!("{err}");
|
tracing::error!("{err}");
|
||||||
ActixAdminNotification::from(err)
|
ActixAdminNotification::from(err)
|
||||||
})
|
})
|
||||||
@ -197,7 +197,7 @@ async fn render_form<E: ActixAdminViewModelTrait>(
|
|||||||
let body = actix_admin.tera
|
let body = actix_admin.tera
|
||||||
.render("create_or_edit.html", &ctx)
|
.render("create_or_edit.html", &ctx)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
#[cfg(enable_tracing)]
|
#[cfg(enable-tracing)]
|
||||||
tracing::error!("{err}");
|
tracing::error!("{err}");
|
||||||
error::ErrorInternalServerError(err)
|
error::ErrorInternalServerError(err)
|
||||||
})?;
|
})?;
|
||||||
|
Loading…
Reference in New Issue
Block a user