From a2c25cd478908975a9ada84b4c815c7100ed76e0 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 17 Feb 2014 13:18:15 +0000 Subject: [PATCH] Deploy new admin user did not use resultset --- Netdisco/Changes | 6 ++++++ Netdisco/META.yml | 2 +- Netdisco/bin/netdisco-deploy | 4 ++-- Netdisco/lib/App/Netdisco.pm | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 922d0d54..c96f3b32 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.023002 - 2014-02-17 + + [BUG FIXES] + + * Deploy new admin user did not use resultset + 2.023001 - 2014-02-14 [ENHANCEMENTS] diff --git a/Netdisco/META.yml b/Netdisco/META.yml index a188fa93..21bad76f 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -74,4 +74,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.023001 +version: 2.023002 diff --git a/Netdisco/bin/netdisco-deploy b/Netdisco/bin/netdisco-deploy index c18c1f72..1488fefe 100755 --- a/Netdisco/bin/netdisco-deploy +++ b/Netdisco/bin/netdisco-deploy @@ -122,8 +122,8 @@ sub _make_password { } } -my $users = schema('netdisco')->resultset('User')->search({-bool => 'admin'}); -if ($users->count == 0) { +my $users = schema('netdisco')->resultset('User'); +if ($users->search({-bool => 'admin'})->count == 0) { say ''; print color 'bold green'; say 'We need to create a user for inital login. This user will be a full Administrator.'; diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 1e84073b..82c98559 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -7,7 +7,7 @@ use 5.010_000; use File::ShareDir 'dist_dir'; use Path::Class; -our $VERSION = '2.023001'; +our $VERSION = '2.023002'; BEGIN { if (not ($ENV{DANCER_APPDIR} || '')