~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/base/rest.py

Fixed a slight issue in convert_bool, which now uses a tuple, and
correctly converts 'false' to False.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
            raise Unauthorized()
62
62
    
63
63
    def convert_bool(self, value):
64
 
        if value == 'True' or value == 'true' or value == True:
 
64
        if value in ('True', 'true', True):
65
65
            return True
66
 
        elif value == 'False' or value == 'False' or value == False:
 
66
        elif value in ('False', 'false', False):
67
67
            return False
68
68
        else:
69
69
            raise BadRequest()