diff options
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs index 304ea34f2..6126594c5 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs @@ -98,6 +98,11 @@ namespace Tango.MachineService.Controllers throw new AuthenticationException("The specified serial number could not be found."); } + if (machine.OsKey == null) + { + throw new InvalidDataException("The specified machine is not associated with an OS activation key."); + } + var machine_version = db.MachineVersions.SingleOrDefault(x => x.Guid == machine.MachineVersionGuid); var latest_machine_version = db.TangoVersions.Where(x => x.MachineVersionGuid == machine_version.Guid).ToList().OrderByDescending(x => Version.Parse(x.Version)).FirstOrDefault(); @@ -128,6 +133,7 @@ namespace Tango.MachineService.Controllers response.DbAddress = Config.DB_ADDRESS; response.DbUserName = credentials.UserName; response.DbPassword = credentials.Password; + response.OSKey = machine.OsKey; } return response; |
