shared task for send notif and sms

This commit is contained in:
Parsa Nazer
2025-03-29 13:15:05 +03:30
parent 98894dbfb6
commit 09df95fe64
3 changed files with 47 additions and 29 deletions
+2
View File
@@ -66,9 +66,11 @@ class OrderModel(models.Model):
def save(self, *args, **kwargs):
# genrate order id
if not self.pk:
last_instance = self.__class__.objects.order_by("pk").last()
self.order_id = (last_instance.pk + 1001) if last_instance else 1001
super().save(*args, **kwargs)