fix JSON encoding problems in Shop/ShipDriver
This commit is contained in:
parent
631bade4f6
commit
35ff40e4b2
1 changed files with 2 additions and 2 deletions
|
|
@ -158,7 +158,7 @@ sub get {
|
|||
$opts = {};
|
||||
}
|
||||
else {
|
||||
$opts = JSON::from_json($opts);
|
||||
$opts = decode_json($opts);
|
||||
}
|
||||
if (defined $param) {
|
||||
return $opts->{$param};
|
||||
|
|
@ -303,7 +303,7 @@ sub update {
|
|||
my $options = shift || {};
|
||||
WebGUI::Error::InvalidParam->throw(error => 'update was not sent a hashref of options to store in the database')
|
||||
unless ref $options eq 'HASH' and scalar keys %{ $options };
|
||||
my $jsonOptions = to_json($options);
|
||||
my $jsonOptions = encode_json($options);
|
||||
$options{id $self} = $jsonOptions;
|
||||
$self->session->db->write('update shipper set options=? where shipperId=?', [$jsonOptions, $self->getId]);
|
||||
return undef;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue