Skip to content

Commit

Permalink
fix(backend): do not update seen updated_at when editing it
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Jul 9, 2024
1 parent 44ac712 commit 51d7e7c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions apps/backend/src/miscellaneous/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3102,7 +3102,6 @@ impl MiscellaneousService {
Some(s) => s,
None => return Err(Error::new("No seen found for this user and metadata")),
};
let mut updated_at = seen.updated_at.clone();
if seen.user_id != user_id {
return Err(Error::new("No seen found for this user and metadata"));
}
Expand All @@ -3113,8 +3112,6 @@ impl MiscellaneousService {
if let Some(finished_on) = input.finished_on {
seen.finished_on = ActiveValue::Set(Some(finished_on));
}
updated_at.push(Utc::now());
seen.updated_at = ActiveValue::Set(updated_at);
let seen = seen.update(&self.db).await.unwrap();
self.after_media_seen_tasks(seen).await?;
Ok(true)
Expand Down

0 comments on commit 51d7e7c

Please sign in to comment.