Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
expense_tracker
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
expense_tracker
Commits
920e4372
Commit
920e4372
authored
2 years ago
by
AKHIL BABU
Committed by
Sujan Shrestha
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3325447
by sujan.shrestha: Warning Upon creating new transaction
parent
a02722ac
No related branches found
No related tags found
1 merge request
!1
3325447-Warning-Upon-creating-new-transaction
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Entity/EtTransaction.php
+6
-4
6 additions, 4 deletions
src/Entity/EtTransaction.php
with
6 additions
and
4 deletions
src/Entity/EtTransaction.php
+
6
−
4
View file @
920e4372
...
@@ -680,10 +680,12 @@ class EtTransaction extends ContentEntityBase implements EtTransactionInterface
...
@@ -680,10 +680,12 @@ class EtTransaction extends ContentEntityBase implements EtTransactionInterface
*/
*/
public
function
preSave
(
EntityStorageInterface
$storage
)
{
public
function
preSave
(
EntityStorageInterface
$storage
)
{
parent
::
preSave
(
$storage
);
parent
::
preSave
(
$storage
);
foreach
(
$this
->
choice
as
$choice_item
)
{
if
(
!
empty
(
$this
->
choice
))
{
if
(
$choice_item
->
entity
&&
$choice_item
->
entity
->
needsSaving
())
{
foreach
(
$this
->
choice
as
$choice_item
)
{
$choice_item
->
entity
->
save
();
if
(
$choice_item
->
entity
&&
$choice_item
->
entity
->
needsSaving
())
{
$choice_item
->
target_id
=
$choice_item
->
entity
->
id
();
$choice_item
->
entity
->
save
();
$choice_item
->
target_id
=
$choice_item
->
entity
->
id
();
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment