Merge pull request #3574 from warwickmm/first_or_default_delegate
Simplify enumeration of collection
This commit is contained in:
@@ -768,7 +768,7 @@ namespace Duplicati.Server
|
||||
null,
|
||||
(n, a) =>
|
||||
{
|
||||
var existing = (a.Where(x => x.BackupID == backup.ID)).FirstOrDefault();
|
||||
var existing = a.FirstOrDefault(x => x.BackupID == backup.ID);
|
||||
if (existing == null)
|
||||
return n;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user