Fix invalid query for settings and users

This commit is contained in:
GW_MC
2025-12-18 22:10:10 +08:00
parent ed4a091d6e
commit 8f2193bed2
3 changed files with 7 additions and 5 deletions

View File

@@ -77,10 +77,11 @@ impl SettingsStore for SettingsService {
Ok(None) => {
handle_not_found(key.to_string(), value).await?;
}
Ok(Some(mut record)) => {
record.value = value;
record
.into_active_model()
Ok(Some(record)) => {
let mut record_active_model = record.into_active_model();
record_active_model.value = ActiveValue::Set(value);
record_active_model.updated_at = ActiveValue::Set(chrono::Utc::now());
record_active_model
.update(&*self.connection)
.await
.map_err(ServiceError::from)?;