qol: inline variable declaration

This commit is contained in:
Gary Sharp
2025-07-20 15:12:33 +10:00
parent 5792771ea1
commit 1add4ee0f5
89 changed files with 1229 additions and 1512 deletions
@@ -39,11 +39,9 @@ namespace Disco.Web.Areas.Config.Controllers
if (m.DeviceProfile.DefaultOrganisationAddress.HasValue)
m.DefaultOrganisationAddress = Database.DiscoConfiguration.OrganisationAddresses.GetAddress(m.DeviceProfile.DefaultOrganisationAddress.Value);
DeviceProfileAssignedUsersManagedGroup assignedUsersManagedGroup;
if (DeviceProfileAssignedUsersManagedGroup.TryGetManagedGroup(m.DeviceProfile, out assignedUsersManagedGroup))
if (DeviceProfileAssignedUsersManagedGroup.TryGetManagedGroup(m.DeviceProfile, out var assignedUsersManagedGroup))
m.AssignedUsersLinkedGroup = assignedUsersManagedGroup;
DeviceProfileDevicesManagedGroup devicesManagedGroup;
if (DeviceProfileDevicesManagedGroup.TryGetManagedGroup(m.DeviceProfile, out devicesManagedGroup))
if (DeviceProfileDevicesManagedGroup.TryGetManagedGroup(m.DeviceProfile, out var devicesManagedGroup))
m.DevicesLinkedGroup = devicesManagedGroup;
// Ensure Specified OU Exists