diff --git a/apps/channels/api_views.py b/apps/channels/api_views.py index fb1037a4..92755252 100644 --- a/apps/channels/api_views.py +++ b/apps/channels/api_views.py @@ -623,12 +623,7 @@ class ChannelViewSet(viewsets.ModelViewSet): ) # If the provided number is already used, return an error. if Channel.objects.filter(channel_number=channel_number).exists(): - return Response( - { - "error": f"Channel number {channel_number} is already in use. Please choose a different number." - }, - status=status.HTTP_400_BAD_REQUEST, - ) + channel_number = Channel.get_next_available_channel_number(channel_number) # Get the tvc_guide_stationid from custom properties if it exists tvc_guide_stationid = None if "tvc-guide-stationid" in stream_custom_props: diff --git a/frontend/src/WebSocket.jsx b/frontend/src/WebSocket.jsx index 3414a9a2..d917d115 100644 --- a/frontend/src/WebSocket.jsx +++ b/frontend/src/WebSocket.jsx @@ -553,7 +553,7 @@ export const WebsocketProvider = ({ children }) => { // General notification for channel creation notifications.show({ title: 'Channels Created', - message: `Successfully created ${parsedEvent.data.count || 'multiple'} channels`, + message: `Successfully created ${parsedEvent.data.count || 'multiple'} channel(s)`, color: 'green', autoClose: 4000, });