Compare commits

..

1 Commits

Author SHA1 Message Date
Connor Johnstone
37410ce216 Error handling changes 2026-03-18 15:20:13 -04:00

View File

@@ -86,7 +86,8 @@ pub async fn retry_failed(db: &DatabaseConnection, id: i32) -> DbResult<()> {
let mut active: ActiveModel = item.into();
active.status = Set(DownloadStatus::Pending);
active.error_message = Set(None);
active.retry_count = Set(active.retry_count.unwrap() + 1);
let current_retries = active.retry_count.take().unwrap_or(0);
active.retry_count = Set(current_retries + 1);
active.updated_at = Set(Utc::now().naive_utc());
active.update(db).await?;
Ok(())