Skip to content

Commit

Permalink
Adjust harvest code to delete removed events from the right table
Browse files Browse the repository at this point in the history
  • Loading branch information
owi92 committed May 29, 2024
1 parent 7b66a05 commit 3eef393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/sync/harvest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ async fn store_in_db(
}

HarvestItem::EventDeleted { id: opencast_id, .. } => {
let rows_affected = db
.execute("delete from events where opencast_id = $1", &[&opencast_id])
let rows_affected_a = db
.execute("delete from all_events where opencast_id = $1", &[&opencast_id])
.await?;
check_affected_rows_removed(rows_affected, "event", &opencast_id);
check_affected_rows_removed(rows_affected_a, "event", &opencast_id);
removed_events += 1;
}

Expand Down

0 comments on commit 3eef393

Please sign in to comment.