mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-25 11:04:07 +00:00
Bug Fix: Sort order while bulk creating channels will now be in the order they were selected in not reverse order.
This commit is contained in:
parent
5bb2b57a4e
commit
c73271c617
1 changed files with 3 additions and 1 deletions
|
|
@ -2256,7 +2256,9 @@ def bulk_create_channels_from_streams(self, stream_ids, channel_profile_ids=None
|
|||
|
||||
for i in range(0, total_streams, batch_size):
|
||||
batch_stream_ids = stream_ids[i:i + batch_size]
|
||||
batch_streams = Stream.objects.filter(id__in=batch_stream_ids)
|
||||
# Fetch streams and preserve the order from batch_stream_ids
|
||||
batch_streams_dict = {stream.id: stream for stream in Stream.objects.filter(id__in=batch_stream_ids)}
|
||||
batch_streams = [batch_streams_dict[stream_id] for stream_id in batch_stream_ids if stream_id in batch_streams_dict]
|
||||
|
||||
# Send progress update
|
||||
send_websocket_update('updates', 'update', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue