fix - accidentally deleting channels from other servers
All checks were successful
Build and Push Docker Image / build (push) Successful in 51s

This commit is contained in:
Corban-Lee Jones 2024-10-03 17:10:23 +01:00
parent bd4ac4adcc
commit acc17cc9db

View File

@ -177,5 +177,5 @@ class ChannelsView(View):
"""
channel_ids = [item["id"] for item in channel_data]
count, _ = await DiscordChannel.objects.exclude(server=server, id__in=channel_ids).adelete()
count, _ = await DiscordChannel.objects.filter(server=server).exclude(id__in=channel_ids).adelete()
log.info("Deleted %s dead DiscordChannel object(s)", count)