summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-09-30 19:29:30 +0200
committerYorhel <git@yorhel.nl>2020-09-30 19:29:30 +0200
commit54ddf1f4adfc4362096d325c413443f93d96af27 (patch)
tree955006a14963379bcec1c928ee146df6283d8b15
parent4ce0eb6a7c1376de74b344457bdfb5a140f500df (diff)
TraitEdit: Fix setting of group column
-rw-r--r--lib/VNWeb/TT/TraitEdit.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNWeb/TT/TraitEdit.pm b/lib/VNWeb/TT/TraitEdit.pm
index 11320a7e..d780c82a 100644
--- a/lib/VNWeb/TT/TraitEdit.pm
+++ b/lib/VNWeb/TT/TraitEdit.pm
@@ -123,9 +123,9 @@ elm_api TraitEdit => $FORM_OUT, $FORM_IN, sub {
);
return elm_DupNames $dups if @$dups;
- my %set = map +($_,$data->{$_}), qw/name alias description state addedby sexual defaultspoil searchable applicable order/;
- $set{'"group"'} = delete $set{group};
- $set{'"order"'} = delete $set{order};
+ my %set = map +($_,$data->{$_}), qw/name alias description state addedby sexual defaultspoil searchable applicable/;
+ $set{'"group"'} = $data->{group};
+ $set{'"order"'} = $data->{order};
$set{added} = sql 'NOW()' if $id && $data->{state} == 2 && $e->{state} != 2;
tuwf->dbExeci('UPDATE traits SET', \%set, 'WHERE id =', \$id) if $id;
$id = tuwf->dbVali('INSERT INTO traits', \%set, 'RETURNING id') if !$id;