mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Bug Fix: Fixed Channel Profile filter incorrectly applying profile membership filtering even when "Show Disabled" was enabled, preventing all channels from being displayed. Profile filter now only applies when hiding disabled channels. (Fixes #825)
This commit is contained in:
parent
ad334347a9
commit
ba5aa861e3
2 changed files with 7 additions and 1 deletions
|
|
@ -432,10 +432,15 @@ class ChannelViewSet(viewsets.ModelViewSet):
|
|||
if channel_profile_id:
|
||||
try:
|
||||
profile_id_int = int(channel_profile_id)
|
||||
filters["channelprofilemembership__channel_profile_id"] = profile_id_int
|
||||
|
||||
if show_disabled_param is None:
|
||||
# Show only enabled channels: channels that have a membership
|
||||
# record for this profile with enabled=True
|
||||
# Default is DISABLED (channels without membership are hidden)
|
||||
filters["channelprofilemembership__channel_profile_id"] = profile_id_int
|
||||
filters["channelprofilemembership__enabled"] = True
|
||||
# If show_disabled is True, show all channels (no filtering needed)
|
||||
|
||||
except (ValueError, TypeError):
|
||||
# Ignore invalid profile id values
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue