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,
|
WarrantyExpires = db.WarrantyValidUntil,
|
||||||
InsuranceSupplier = db.InsuranceSupplier,
|
InsuranceSupplier = db.InsuranceSupplier,
|
||||||
InsuredUntil = db.InsuredUntil
|
InsuredUntil = db.InsuredUntil
|
||||||
}).Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
}).ToArray().Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
|||||||
DistributionTypeId = dp.DistributionTypeDb,
|
DistributionTypeId = dp.DistributionTypeDb,
|
||||||
DeviceCount = dp.Devices.Count,
|
DeviceCount = dp.Devices.Count,
|
||||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
||||||
}).Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
}).ToArray().Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||||
|
|
||||||
if (DiscoApplication.MultiSiteMode)
|
if (DiscoApplication.MultiSiteMode)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user