|
|
|
|
@ -67,7 +67,7 @@ namespace Expedience.Api.Consumers
|
|
|
|
|
dbContext.DutyCompletionResults.Add(completionResult);
|
|
|
|
|
|
|
|
|
|
// Insert this territory if it does not exist
|
|
|
|
|
var territory = dbContext.Territories.FirstOrDefault(t => t.TerritoryId == completionResult.TerritoryId)
|
|
|
|
|
var territory = dbContext.Territories.FirstOrDefault(t => t.TerritoryId == completionResult.TerritoryId);
|
|
|
|
|
if (territory == null)
|
|
|
|
|
{
|
|
|
|
|
dbContext.Territories.Add(new Models.Territory
|
|
|
|
|
|