Skip to content

Commit ed07070

Browse files
Jeffjagerman
authored andcommitted
do not include keys in dict we do not care about like session_id room and user
1 parent 9218b27 commit ed07070

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sogs/model/room.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,10 +1517,9 @@ def permissions(self):
15171517
):
15181518
data = dict()
15191519
for k in row.keys():
1520-
if k not in ('session_id', 'room', 'user'):
1521-
if k in ('banned', 'moderator', 'admin', 'visible_mod') and not row[k]:
1522-
continue # only include banned when true
1523-
if row[k] is not None:
1520+
if k in ('banned', 'moderator', 'admin', 'visible_mod') and not row[k]:
1521+
continue # only include banned when true
1522+
if row[k] is not None and k not in ('session_id', 'room', 'user'):
15241523
data[k] = bool(row[k])
15251524
ret[row['session_id']] = data
15261525
return ret

0 commit comments

Comments
 (0)