BasketSnapshot: fix upload issue

fixes #1782
This commit is contained in:
Thomas Gelf 2019-02-12 11:28:28 +01:00
parent 0139506494
commit 90b31fc6ca

View File

@ -184,7 +184,10 @@ class BasketSnapshot extends DbObject
$snapshot = static::create([
'basket_uuid' => $basket->get('uuid')
]);
$snapshot->objects = (array) Json::decode($string);
$snapshot->objects = [];
foreach ((array) Json::decode($string) as $type => $objects) {
$snapshot->objects[$type] = (array) $objects;
}
return $snapshot;
}