File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1547,7 +1547,7 @@ def future_permissions(self):
1547
1547
continue
1548
1548
if k in ('at' , 'session_id' ):
1549
1549
data [k ] = row [k ]
1550
- else :
1550
+ elif row [ k ] is not None :
1551
1551
data [k ] = bool (row [k ])
1552
1552
ret .append (data )
1553
1553
return ret
Original file line number Diff line number Diff line change @@ -312,10 +312,10 @@ def get_permission_info(room):
312
312
if compact is set to 1 this will be a string,
313
313
otherwise it will be a dict containing the name of the permission mapped to a boolean value.
314
314
"""
315
- transform = lambda x : x # noqa: E731
315
+ perms = room . permissions
316
316
if request .args .get ("compact" , type = int , default = 0 ):
317
- transform = compact_permissions
318
- return jsonify (transform ( room . permissions ) )
317
+ perms = { key : compact_permissions ( perms [ key ]) for key in perms }
318
+ return jsonify (perms )
319
319
320
320
321
321
@rooms .get ("/room/<Room:room>/futurePermInfo" )
You can’t perform that action at this time.
0 commit comments