Skip to content

Commit

Permalink
Add log lines for empty revisions.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Sep 30, 2024
1 parent 57c5e53 commit b11711b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions deepwell/src/services/file_revision/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ impl FileRevisionService {
// If nothing has changed, then don't create a new revision
// Also don't rerender the page, this isn't an edit.
if changes.is_empty() {
debug!("No changes in file, performing no action");
return Ok(None);
}

Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/page_revision/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ impl PageRevisionService {

// If nothing has changed, then don't create a new revision
if changes.is_empty() {
debug!("No changes in edit, only rerendering the page");
Self::rerender(ctx, site_id, page_id, 0).await?;
return Ok(None);
}
Expand Down

0 comments on commit b11711b

Please sign in to comment.