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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2017-12-28 12:19:43 +05:30 committed by James Valleroy
parent 4506437927
commit 15f2e7d0c3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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'])