fix 父节点不存在
This commit is contained in:
@@ -210,7 +210,7 @@ namespace Ewide.Core.Service
|
||||
[UnitOfWork]
|
||||
public async Task UpdateOrg(UpdateOrgInput input)
|
||||
{
|
||||
if (input.Pid != "0" && !string.IsNullOrEmpty(input.Pid))
|
||||
if (!input.Pid.Equals(System.Guid.Empty.ToString()) && !string.IsNullOrEmpty(input.Pid))
|
||||
{
|
||||
var org = await _sysOrgRep.DetachedEntities.FirstOrDefaultAsync(u => u.Id == input.Pid);
|
||||
_ = org ?? throw Oops.Oh(ErrorCode.D2000);
|
||||
|
||||
Reference in New Issue
Block a user