Skip to content

Commit

Permalink
Addressing quality gate failure
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutomi committed Jan 25, 2025
1 parent 5e0bfaa commit 704cf1e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ public EntityUserRepository(DbContext context, ITenantInfo? tenantInfo, IUserAcc
protected override TEntity OnAddingEntity(TEntity entity)
{
var userId = UserId;
if (userId != null && !Equals(entity.Owner, userId))
entity.SetOwner(userId);
if (!Equals(default(TUserKey), UserId)
&& !Equals(entity.Owner, userId))
entity.SetOwner(userId!);

return entity;
}
Expand Down

0 comments on commit 704cf1e

Please sign in to comment.