diff --git a/deepwell/src/services/file_revision/service.rs b/deepwell/src/services/file_revision/service.rs index 99ee8b2a90..a7a1920f5e 100644 --- a/deepwell/src/services/file_revision/service.rs +++ b/deepwell/src/services/file_revision/service.rs @@ -71,11 +71,14 @@ impl FileRevisionService { let txn = ctx.transaction(); let revision_number = next_revision_number(&previous, page_id, file_id); - // Replace with debug_assert_matches! when stablized + // Replace with debug_assert_matches! when stablized. + // This should correspond to each use of FileRevisionService::create() in FileService. debug_assert!( matches!( revision_type, - FileRevisionType::Regular | FileRevisionType::Rollback, + FileRevisionType::Regular + | FileRevisionType::Move + | FileRevisionType::Rollback, ), "Invalid revision type for standard revision creation", ); @@ -541,7 +544,6 @@ impl FileRevisionService { pub async fn get_range( ctx: &ServiceContext<'_>, GetFileRevisionRange { - page_id, file_id, revision_number, revision_direction, @@ -570,7 +572,6 @@ impl FileRevisionService { let revisions = FileRevision::find() .filter( Condition::all() - .add(file_revision::Column::PageId.eq(page_id)) .add(file_revision::Column::FileId.eq(file_id)) .add(revision_condition), ) diff --git a/deepwell/src/services/file_revision/structs.rs b/deepwell/src/services/file_revision/structs.rs index c412184a7b..c0a3dcf672 100644 --- a/deepwell/src/services/file_revision/structs.rs +++ b/deepwell/src/services/file_revision/structs.rs @@ -122,7 +122,6 @@ pub struct UpdateFileRevision { #[derive(Deserialize, Debug, Clone)] pub struct GetFileRevisionRange { - pub page_id: i64, pub file_id: i64, pub revision_number: i32, pub revision_direction: FetchDirection,