Fix error when deleting rooms containing projects on refresh
A foreign key violation was causing the server to never delete stale rooms during `Database::refresh_room` due to having one or more project records referencing the room.
This commit is contained in:
parent
e74db2d180
commit
bbeb33bc7e
3 changed files with 20 additions and 5 deletions
|
@ -270,8 +270,11 @@ impl Server {
|
|||
let mut live_kit_room = String::new();
|
||||
let mut delete_live_kit_room = false;
|
||||
|
||||
if let Ok(mut refreshed_room) =
|
||||
app_state.db.refresh_room(room_id, server_id).await
|
||||
if let Some(mut refreshed_room) = app_state
|
||||
.db
|
||||
.refresh_room(room_id, server_id)
|
||||
.await
|
||||
.trace_err()
|
||||
{
|
||||
tracing::info!(
|
||||
room_id = room_id.0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue