✨ (seaorm): Reexporta IntoActiveModel

This commit is contained in:
Manuel Cillero 2026-10-17 11:43:53 +02:00
parent 9c52873d54
commit 20050e4a67
3 changed files with 10 additions and 8 deletions

View file

@ -2,8 +2,8 @@
use pagetop::prelude::*;
use pagetop_seaorm::db::{
ActiveModelTrait, ActiveValue, ColumnTrait, Condition, EntityTrait, PaginatorTrait,
QueryFilter, Set, dbconn,
ActiveModelTrait, ActiveValue, ColumnTrait, Condition, EntityTrait, IntoActiveModel,
PaginatorTrait, QueryFilter, Set, dbconn,
};
use crate::account::UserStatus;
@ -61,7 +61,7 @@ pub async fn login(
// Actualizar last_login_at y resetear contador de fallos.
let user_id = user_model.id;
let needs_rehash = password::needs_rehash(&user_model.password_hash);
let mut active: user::ActiveModel = user_model.into();
let mut active = user_model.into_active_model();
active.last_login_at = Set(Some(now));
active.last_access_at = Set(Some(now));
active.failed_login_count = Set(0);