mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-13 16:22:42 +02:00
fix: recurring transactions not adding entities or tags to created transactions
This commit is contained in:
@@ -20,7 +20,6 @@ from django.core.validators import MinValueValidator
|
|||||||
from django.db import models, transaction
|
from django.db import models, transaction
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.dispatch import Signal
|
from django.dispatch import Signal
|
||||||
from django.forms import ValidationError
|
|
||||||
from django.template.defaultfilters import date
|
from django.template.defaultfilters import date
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
@@ -871,10 +870,8 @@ class RecurringTransaction(models.Model):
|
|||||||
notes=self.notes if self.add_notes_to_transaction else "",
|
notes=self.notes if self.add_notes_to_transaction else "",
|
||||||
owner=self.account.owner,
|
owner=self.account.owner,
|
||||||
)
|
)
|
||||||
if self.tags.exists():
|
created_transaction.tags.set(self.tags.all())
|
||||||
created_transaction.tags.set(self.tags.all())
|
created_transaction.entities.set(self.entities.all())
|
||||||
if self.entities.exists():
|
|
||||||
created_transaction.entities.set(self.entities.all())
|
|
||||||
|
|
||||||
def get_recurrence_delta(self):
|
def get_recurrence_delta(self):
|
||||||
if self.recurrence_type == self.RecurrenceType.DAY:
|
if self.recurrence_type == self.RecurrenceType.DAY:
|
||||||
|
|||||||
Reference in New Issue
Block a user