mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 09:06:06 +00:00
fix(ts-proxy): Remove redundant local import causing UnboundLocalError
The local `from apps.channels.models import Channel` inside a conditional block in _handle_client_disconnect() shadowed the top-level import. When the condition was False, Python's function-level scoping caused line 462's Channel.objects.get() to raise UnboundLocalError. Channel is already imported at module level (line 11), making the local import unnecessary. Discovered when testing proxy changes
This commit is contained in:
parent
6360271e28
commit
8bb8a0fca9
1 changed files with 0 additions and 1 deletions
|
|
@ -437,7 +437,6 @@ class StreamGenerator:
|
|||
client_count = proxy_server.client_managers[self.channel_id].get_total_client_count()
|
||||
# Only the last client or owner should release the stream
|
||||
if client_count <= 1 and proxy_server.am_i_owner(self.channel_id):
|
||||
from apps.channels.models import Channel
|
||||
try:
|
||||
# Get the channel by UUID
|
||||
channel = Channel.objects.get(uuid=self.channel_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue