Skip to content

Commit

Permalink
Use contain() instaed of in operator
Browse files Browse the repository at this point in the history
See also: #7
  • Loading branch information
BECATRUE committed Nov 22, 2024
1 parent 4289803 commit ef45dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wlm_server/setting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def handle_info(request, ch: int):
channel = Channel.objects.get(channel=ch)
except Channel.DoesNotExist:
return HttpResponse(status=404)
if user.team not in channel.teams.all():
if not channel.teams.contains(user.team):
return HttpResponse(status=403)
message_queue: MessageQueue = settings.MESSAGE_QUEUE
latest_setting = Setting.objects.filter(channel__channel=ch).order_by('-created_at').first()
Expand Down

0 comments on commit ef45dfb

Please sign in to comment.