From dba3fafa87eff2de568861f0dc3ea43c398ad15d Mon Sep 17 00:00:00 2001 From: luukas Date: Fri, 20 May 2022 13:31:30 +0300 Subject: [PATCH] Use shorthand for Controller.check_system_user This reduced the code from 4 lines to 1 line. The code if : return True else: return False can be shortened to return --- app/classes/shared/main_controller.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index 39a3f0fa..9e08c04c 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -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