Fixed the errorof finding tag in wrong table
This commit is contained in:
parent
23db7c4861
commit
a0b36b204e
@ -89,8 +89,8 @@ namespace Marco.Pms.Services.Helpers
|
||||
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
|
||||
if (contactTagDto != null)
|
||||
{
|
||||
ContactCategoryMaster? existingContactCategory = await _context.ContactCategoryMasters.FirstOrDefaultAsync(c => c.TenantId == tenantId && c.Name.ToLower() == (contactTagDto.Name != null ? contactTagDto.Name.ToLower() : ""));
|
||||
if (existingContactCategory == null)
|
||||
ContactTagMaster? existingContactTag = await _context.ContactTagMasters.FirstOrDefaultAsync(c => c.TenantId == tenantId && c.Name.ToLower() == (contactTagDto.Name != null ? contactTagDto.Name.ToLower() : ""));
|
||||
if (existingContactTag == null)
|
||||
{
|
||||
ContactTagMaster contactTag = contactTagDto.ToContactTagMasterFromCreateContactTagDto(tenantId);
|
||||
_context.ContactTagMasters.Add(contactTag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user