Skip to content

Commit

Permalink
curr_tot can be a None object (Issue #33 comment section, or https://…
Browse files Browse the repository at this point in the history
  • Loading branch information
juice500ml committed Feb 10, 2017
1 parent 9508a93 commit 2fa49ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manage_room/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def room_leave(message):
})

curr_tot = cache.get(message["room"])
if curr_tot < 2:
if curr_tot and curr_tot < 2:
cache.expire(message["room"], timeout=0)
else:
cache.set(message["room"], curr_tot - 1, timeout=7200)
Expand Down

0 comments on commit 2fa49ae

Please sign in to comment.