[open-ils-commits] r10183 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jul 29 22:18:29 EDT 2008
Author: erickson
Date: 2008-07-29 22:18:22 -0400 (Tue, 29 Jul 2008)
New Revision: 10183
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
Log:
setting attr def when creating a new local/usr lineitem_attr
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-07-30 02:12:50 UTC (rev 10182)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-07-30 02:18:22 UTC (rev 10183)
@@ -736,6 +736,8 @@
attr_type => $attr_type,
attr_name => $attr_name})->[0];
+ my $find = "search_acq_$attr_type";
+
if($attr) {
$attr->attr_value($attr_value);
$e->update_acq_lineitem_attr($attr) or return $e->die_event;
@@ -745,6 +747,10 @@
$attr->attr_type($attr_type);
$attr->attr_name($attr_name);
$attr->attr_value($attr_value);
+
+ my $attr_def_id = $e->$find({code => $attr_name}, {idlist=>1})->[0]
+ or return $e->die_event;
+ $attr->definition($attr_def_id);
$e->create_acq_lineitem_attr($attr) or return $e->die_event;
}
More information about the open-ils-commits
mailing list