Fix: EDM -> Cast<>; Retrieve items first
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
WarrantyExpires = db.WarrantyValidUntil,
|
||||
InsuranceSupplier = db.InsuranceSupplier,
|
||||
InsuredUntil = db.InsuredUntil
|
||||
}).Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
||||
}).ToArray().Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
DistributionTypeId = dp.DistributionTypeDb,
|
||||
DeviceCount = dp.Devices.Count,
|
||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
||||
}).Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||
}).ToArray().Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||
|
||||
if (DiscoApplication.MultiSiteMode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user