mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Fixed issue with saving to db
This commit is contained in:
parent
f60e880da5
commit
131a99b1bb
3 changed files with 3 additions and 9 deletions
|
@ -289,14 +289,8 @@ namespace PlexRequests.Store.Repository
|
|||
ResetCache();
|
||||
using (var db = Config.DbConnection())
|
||||
{
|
||||
var result = enumerable.Sum(e => db.Insert(e));
|
||||
|
||||
var format = values.AddPrefix("@", ",");
|
||||
var processQuery = $"INSERT INTO {tableName} VALUES ({format})";
|
||||
var result = 0;
|
||||
foreach (var e in enumerable)
|
||||
{
|
||||
result += db.Execute(processQuery, e);
|
||||
}
|
||||
return result == enumerable.Length;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue