BasketUpload: ignore Datafields, they get special
...treatment
This commit is contained in:
parent
640da36c62
commit
e961f0eb2a
|
@ -122,7 +122,9 @@ class BasketUploadForm extends DirectorObjectForm
|
|||
$basket = $this->object();
|
||||
|
||||
foreach ($this->upload as $type => $content) {
|
||||
$basket->addObjects($type, array_keys((array) $content));
|
||||
if ($type !== 'Datafield') {
|
||||
$basket->addObjects($type, array_keys((array) $content));
|
||||
}
|
||||
}
|
||||
if ($basket->isEmpty()) {
|
||||
$this->addError($this->translate("It's not allowed to store an empty basket"));
|
||||
|
|
|
@ -61,6 +61,7 @@ class Basket extends DbObject implements ExportInterface
|
|||
protected function onLoadFromDb()
|
||||
{
|
||||
$this->chosenObjects = (array) Json::decode($this->get('objects'));
|
||||
unset($this->chosenObjects['Datafield']); // Might be in old baskets
|
||||
}
|
||||
|
||||
public function getUniqueIdentifier()
|
||||
|
|
Loading…
Reference in New Issue