Use shorthand for Controller.check_system_user

This reduced the code from 4 lines to 1 line.

The code
    if <condition>:
        return True
    else:
        return False
can be shortened to
    return <condition>
This commit is contained in:
luukas 2022-05-20 13:31:30 +03:00
parent 1b059b24df
commit dba3fafa87
No known key found for this signature in database
GPG Key ID: CC4915E8D71FC044

View File

@ -147,10 +147,7 @@ class Controller:
@staticmethod
def check_system_user():
if HelperUsers.get_user_id_by_name("system") is not None:
return True
else:
return False
return HelperUsers.get_user_id_by_name("system") is not None
def set_project_root(self, root_dir):
self.project_root = root_dir