This commit is contained in:
2021-05-14 14:16:51 +00:00
parent a7895a64bc
commit 8947ec0cac

View File

@@ -86,9 +86,7 @@ namespace AyaNova.Biz
//(seeder or api user, not something AyaNova front end would do)
if (newObject.Items.Count > 0)//our front end will post the header alone on new so this indicates a fully populated wo was saved
{
if (newObject.ContractId != null)
mContractInEffect = await ct.Contract.AsNoTracking().FirstOrDefaultAsync(z => z.Id == newObject.ContractId);
mFetchedContractAlready = true;
await GetCurrentContractFromContractIdAsync(newObject.ContractId);
await ProcessChangeOfContractAsync(newObject.Id);
}
@@ -256,10 +254,7 @@ namespace AyaNova.Biz
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, putObject.Tags, dbObject.Tags);
if (contractChanged)
{
if (newContractId != null)
mContractInEffect = await ct.Contract.AsNoTracking().FirstOrDefaultAsync(z => z.Id == newContractId);
mFetchedContractAlready = true;
await GetCurrentContractFromContractIdAsync(newContractId);
await ProcessChangeOfContractAsync(putObject.Id);
}
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Modified, putObject, dbObject);