mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
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:
parent
1b059b24df
commit
dba3fafa87
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user