Skip to content
Snippets Groups Projects
Commit 920e4372 authored by AKHIL BABU's avatar AKHIL BABU Committed by Sujan Shrestha
Browse files

Issue #3325447 by sujan.shrestha: Warning Upon creating new transaction

parent a02722ac
No related branches found
No related tags found
1 merge request!13325447-Warning-Upon-creating-new-transaction
......@@ -680,10 +680,12 @@ class EtTransaction extends ContentEntityBase implements EtTransactionInterface
*/
public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage);
foreach ($this->choice as $choice_item) {
if ($choice_item->entity && $choice_item->entity->needsSaving()) {
$choice_item->entity->save();
$choice_item->target_id = $choice_item->entity->id();
if (!empty($this->choice)) {
foreach ($this->choice as $choice_item) {
if ($choice_item->entity && $choice_item->entity->needsSaving()) {
$choice_item->entity->save();
$choice_item->target_id = $choice_item->entity->id();
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment