Skip to content

Commit 2f01319

Browse files
committed
fix(user_management): remove redundant role filter check
- Remove unnecessary condition for DashboardUserRole.none - Directly assign dashboardRole to filter when it's not null
1 parent 3f8f9df commit 2f01319

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/user_management/bloc/user_management_bloc.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,7 @@ class UserManagementBloc
130130
}
131131

132132
if (state.dashboardRole != null) {
133-
// When 'Any' is selected, dashboardRole is null, so we don't add the filter.
134-
// Otherwise, we filter by the specific role name.
135-
if (state.dashboardRole != DashboardUserRole.none) {
136-
filter['dashboardRole'] = state.dashboardRole!.name;
137-
}
133+
filter['dashboardRole'] = state.dashboardRole!.name;
138134
}
139135

140136
return filter;

0 commit comments

Comments
 (0)