This commit is contained in:
@@ -14,7 +14,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
|
||||
internal class UserBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject
|
||||
internal class UserBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject//, IExportAbleObject, IImportAbleObject
|
||||
{
|
||||
|
||||
|
||||
@@ -448,11 +448,12 @@ namespace AyaNova.Biz
|
||||
try
|
||||
{
|
||||
User dbObject = await ct.User.SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (dbObject == null){
|
||||
if (dbObject == null)
|
||||
{
|
||||
AddError(ApiErrorCode.NOT_FOUND);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Also used for Contacts (customer type user or ho type user)
|
||||
//by users with no User right but with Customer rights so need to double check here
|
||||
@@ -797,7 +798,10 @@ namespace AyaNova.Biz
|
||||
{
|
||||
SaveIt = false;
|
||||
ClearErrors();
|
||||
var o = await GetAsync(id, false);
|
||||
//a little different than normal here because the built in getasync doesn't return
|
||||
//a full User object normally
|
||||
// var o = await GetAsync(id, false);
|
||||
var o = await ct.User.SingleOrDefaultAsync(z => z.Id == id);
|
||||
switch (job.SubType)
|
||||
{
|
||||
case JobSubType.TagAddAny:
|
||||
@@ -814,10 +818,9 @@ namespace AyaNova.Biz
|
||||
|
||||
if (SaveIt)
|
||||
{
|
||||
User u = new User();
|
||||
CopyObject.Copy(o, u, "Id, Salt, CurrentAuthToken, DlKey, DlKeyExpire");
|
||||
u = await PutAsync(u);
|
||||
if (u == null)
|
||||
|
||||
o = await PutAsync(o);
|
||||
if (o == null)
|
||||
await JobsBiz.LogJobAsync(job.GId, $"Error processing item {id}: {GetErrorsAsString()}");
|
||||
else
|
||||
ChangedObjectCount++;
|
||||
|
||||
Reference in New Issue
Block a user