Skip to content

Commit

Permalink
Fix snapshot add crashing
Browse files Browse the repository at this point in the history
Bug was introduced in 7d3ddb6.
  • Loading branch information
gepbird committed Jun 16, 2024
1 parent 4c918de commit f890e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Services/SnapshotService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ await LogService.LogToFileAndConsole(
sql = $"INSERT INTO snapshot_channels(snapshot_id, channel_id, channel_name) VALUES {placeholders}";
var values = s.Channels
.SelectMany(x => new object[] { id, x.Key, x.Value })
.ToList();
.ToArray();
await DatabaseService.NonQuery(sql, values);
}

Expand All @@ -266,7 +266,7 @@ await LogService.LogToFileAndConsole(
sql = $"INSERT INTO snapshot_roles(snapshot_id, role_id, role_name) VALUES {placeholders}";
var values = s.Roles
.SelectMany(x => new object[] { id, x.Key, x.Value })
.ToList();
.ToArray();
await DatabaseService.NonQuery(sql, values);
}
}
Expand Down

0 comments on commit f890e55

Please sign in to comment.