Skip to content

Commit bd75d24

Browse files
committed
fix: fix missing attribute
1 parent af6f2e4 commit bd75d24

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

jupiter/src/migration/m20250725_103004_add_note.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use sea_orm_migration::prelude::*;
22

33
// Step 1: Define an enum to represent table names and all column names#[derive(Iden)]
4+
#[derive(Iden)]
45
enum Notes {
56
Table,
67
Id,

jupiter/src/storage/note_storage.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ impl NoteStorage {
4949
match save_note {
5050
Ok(model) => Ok(Some(model)),
5151
Err(e) => Err(MegaError::with_message(format!(
52-
"Failed to save note: {}",
53-
e
52+
"Failed to save note: {e}",
5453
))),
5554
}
5655
}
@@ -65,7 +64,8 @@ impl NoteStorage {
6564
let model = notes::Entity::find_by_id(id)
6665
.one(self.get_connection())
6766
.await?
68-
.ok_or_else(|| MegaError::with_message(format!("Note with ID {} not found", id)))?; let mut active_model: notes::ActiveModel = model.into();
67+
.ok_or_else(|| MegaError::with_message(format!("Note with ID {id} not found")))?;
68+
let mut active_model: notes::ActiveModel = model.into();
6969
active_model.description_html = Set(Some(description_html.to_string()));
7070
active_model.description_state = Set(Some(description_state.to_string()));
7171
active_model.description_schema_version = Set(description_schema_version);

0 commit comments

Comments
 (0)