Commit 83236320 authored by Leigh B Stoller's avatar Leigh B Stoller

Minor bug fix.

Also remove the test that requires only one new attribute at a time
Not sure where that came from.
parent 2a415c56
......@@ -455,13 +455,6 @@ foreach $attr_name (@attr_names) {
if $del;
# An attr to be set must pre-exist, unless it's the one new attr.
# (And of course, the attrs of a new_type are *all* new attrs.)
UserError("NodeType Attr: $attr_name is not set in nodetype $node_type!")
if (!$new_type &&
!exists($prev_attrs->{$attr_name}) &&
$attr_name ne $new_attr_name);
$attr_type = $attr_types{$attr_name};
$attr_value = $attr_values{$attr_name};
......@@ -585,7 +578,8 @@ if ($new_type) {
else {
DBQueryFatal("update node_types set ".
join(",", @nodetype_data) . " ".
"where type='$node_type'");
"where type='$node_type'")
if (@nodetype_data);
foreach $attr_name (@attr_names) {
$key = escapeshellarg($attr_name);
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