Fixed server registration ctor and factory to ensure IsActive is correct.
This commit is contained in:
@@ -29,7 +29,8 @@ namespace Umbraco.Core.Models
|
||||
/// <param name="computerName"></param>
|
||||
/// <param name="createDate"></param>
|
||||
/// <param name="updateDate"></param>
|
||||
public ServerRegistration(int id, string serverAddress, string computerName, DateTime createDate, DateTime updateDate)
|
||||
/// <param name="isActive"></param>
|
||||
public ServerRegistration(int id, string serverAddress, string computerName, DateTime createDate, DateTime updateDate, bool isActive)
|
||||
{
|
||||
UpdateDate = updateDate;
|
||||
CreateDate = createDate;
|
||||
@@ -37,6 +38,7 @@ namespace Umbraco.Core.Models
|
||||
Id = id;
|
||||
ServerAddress = serverAddress;
|
||||
ComputerName = computerName;
|
||||
IsActive = isActive;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Persistence.Factories
|
||||
|
||||
public ServerRegistration BuildEntity(ServerRegistrationDto dto)
|
||||
{
|
||||
var model = new ServerRegistration(dto.Id, dto.Address, dto.ComputerName, dto.DateRegistered, dto.LastNotified);
|
||||
var model = new ServerRegistration(dto.Id, dto.Address, dto.ComputerName, dto.DateRegistered, dto.LastNotified, dto.IsActive);
|
||||
//on initial construction we don't want to have dirty properties tracked
|
||||
// http://issues.umbraco.org/issue/U4-1946
|
||||
model.ResetDirtyProperties(false);
|
||||
|
||||
Reference in New Issue
Block a user