This commit is contained in:
@@ -45,12 +45,10 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(UserOptions dbObj, UserOptions inObj)
|
||||
{
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
|
||||
//Replace the db object with the PUT object
|
||||
CopyObject.Copy(inObj, dbObj, "Id, UserId, OwnerId");
|
||||
CopyObject.Copy(inObj, dbObj, "Id, UserId");
|
||||
//Set "original" value of concurrency token to input token
|
||||
//this will allow EF to check it out
|
||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
||||
@@ -98,11 +96,8 @@ namespace AyaNova.Biz
|
||||
//UserOptions is never new, it's created with the User object so were only here for an edit
|
||||
|
||||
|
||||
//OwnerId required
|
||||
if (inObj.OwnerId == 0)
|
||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, "OwnerId");
|
||||
|
||||
//OwnerId required
|
||||
//UserId required
|
||||
if (inObj.UserId == 0)
|
||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, "UserId");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user