remove Refilling.is_validated

This commit is contained in:
imperosol committed 2025-11-19 21:03:55 +01:00
1 parent 78fe4e52ca
commit 56c2c2b70e
6 files changed
+20 -18

No files matched your search

+1 -3
View File
@@ -755,7 +755,6 @@ class Refilling(models.Model):
bank = models.CharField(
_("bank"), max_length=255, choices=settings.SITH_COUNTER_BANK, default="OTHER"
)
is_validated = models.BooleanField(_("is validated"), default=False)
objects = RefillingQuerySet.as_manager()
@@ -772,10 +771,9 @@ class Refilling(models.Model):
if not self.date:
self.date = timezone.now()
self.full_clean()
if not self.is_validated:
if self._state.adding:
self.customer.amount += self.amount
self.customer.save()
self.is_validated = True
if self.customer.user.preferences.notify_on_refill:
Notification(
user=self.customer.user,