From 15f2e7d0c3cfb05133cd0e6f22f0f6ba797d1146 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 28 Dec 2017 12:19:43 +0530 Subject: [PATCH] users: Make sure first run actually works During the first setup, older_version is sent as 0 instead of None. Make sure that is actually works by doing proper condition check. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/users/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/users/__init__.py b/plinth/modules/users/__init__.py index 3a001d020..f38629149 100644 --- a/plinth/modules/users/__init__.py +++ b/plinth/modules/users/__init__.py @@ -57,7 +57,7 @@ def init(): def setup(helper, old_version=None): """Install and configure the module.""" helper.install(managed_packages) - if old_version is None: + if not old_version: helper.call('post', actions.superuser_run, 'users', ['first-setup']) helper.call('post', actions.superuser_run, 'users', ['setup'])