mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Hide Profile Delete if Used by List
This commit is contained in:
parent
1a3e0a3163
commit
9ae411802d
@ -6,12 +6,17 @@ function createProfileInUseSelector(profileProp) {
|
||||
return createSelector(
|
||||
(state, { id }) => id,
|
||||
createAllMoviesSelector(),
|
||||
(id, movies) => {
|
||||
(state) => state.settings.netImports.items,
|
||||
(id, movies, lists) => {
|
||||
if (!id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _.some(movies, { [profileProp]: id });
|
||||
if (_.some(movies, { [profileProp]: id }) || _.some(lists, { [profileProp]: id })) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user