- ABP Framework version: v7.4.2 and v8.0.1
- UI Type: MVC
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): MVC
- Exception message and full stack trace: There is no entity IdentityUser with id = 73d0adc8-6c63-ceeb-4b3a-3a103da86e3c!
- Steps to reproduce the issue:
- 1- create a new user
- 2- delete the creator user
- 3- edit the last created user the issue here is when you try to open the edit user modal, it try to get the user details (creator ) which have already been deleted and it will return an error message "There is no entity IdentityUser with id = 73d0adc8-6c63-ceeb-4b3a-3a103da86e3c!" as a temporary solution to fix this bug we should override the the following method to disable the IsoftDelete filter as the following
public override async Task<IdentityUserDto> GetAsync(Guid id) { using (DataFilter.Disable<ISoftDelete>()) return await base.GetAsync( id ); }
i have a question related to this if I want to display all the users in the table as admin, if I disabled the filter for ISoftDeleted, unfortunately, the IdentityUserDto doesn't return IsDeleted and deletionTime with return data, how to fix this?
public override async Task<PagedResultDto<IdentityUserDto>> GetListAsync(GetIdentityUsersInput input) { using (DataFilter.Disable<ISoftDelete>()) return await base.GetListAsync(input); }
4 Answer(s)
-
0
hi
This is the default behavior. You can't edit deleted users.
1- create a new user 2- delete the creator user 3- edit the last created user
if I want to display all the users in the table as admin, if I disabled the filter for ISoftDeleted, unfortunately, the IdentityUserDto doesn't return IsDeleted and deletionTime with return data, how to fix this?
You can add new endpoint to return the dto with
deletion
info. -
0
you did answer: Exception message and full stack trace! i think it is a BUG
for the 2nd part, what you mean add new endpoint to return dto with deletion info?
-
0
hi
I see, I will try to reproduce this. Thanks.
-
0
hi
We will fix this in the next 8.0 patch version.
Your question credit has been refunded.
We will also add the
IsDeleted and deletionTime
toIdentityUserDto