Commit 42af1a08 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix up problem reported in issue #190 by Eric.

The reason for the duplicate profile happens when you instantiate a
version of the profile, then terminate. That takes you back to the
instantiate page with default=uuid-of-profile, and if that is a version
uuid, we end up with a duplicate cause the list is based on the profile
uuid.

This closes issue #190.
parent 4854480c
<?php
#
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -257,6 +257,14 @@ else {
SPITUSERERROR("This profile is disabled!");
exit();
}
#
# See if we have the version or profile uuid in the list
# already, do not add twice since we do not show versions
# in the picker list.
#
if (array_key_exists($obj->profile_uuid(), $profile_array)) {
unset($profile_array[$obj->profile_uuid()]);
}
$profile_array[$obj->uuid()] = $obj->name();
$profile_default = $obj->uuid();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment