Skip to content

Commit

Permalink
Use contains() instead of in operator
Browse files Browse the repository at this point in the history
See also: #7
  • Loading branch information
BECATRUE committed Nov 21, 2024
1 parent 98acb37 commit 84e145c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wlm_server/operation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_running_status(ch: int) -> tuple[bool, bool]:
def handle_info(request, ch: int):
user = request.user
channel = Channel.objects.get(channel=ch)
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
req_data = request.data.copy()
Expand Down

0 comments on commit 84e145c

Please sign in to comment.