From f7b62b45f336b1e1d198d18129b7e5b25fecd1b6 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Mon, 1 Dec 2025 11:09:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20delete():=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=B4=D0=B5=D0=BB=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=20=D0=A1?= =?UTF-8?q?=D0=9D=D0=AF=D0=A2=20(discontinued),=20=D0=B0=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=90=D0=A0=D0=A5=D0=98=D0=92=D0=9D=D0=AB=D0=99=20(archived)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- myproject/products/models/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/myproject/products/models/base.py b/myproject/products/models/base.py index 314fee4..66af855 100644 --- a/myproject/products/models/base.py +++ b/myproject/products/models/base.py @@ -184,9 +184,9 @@ class BaseProductEntity(models.Model): self.save(update_fields=['status', 'archived_by']) def delete(self, *args, **kwargs): - """Для совместимости: вызывает archive()""" + """Для совместимости: вызывает discontinue() - статус СНЯТ""" user = kwargs.pop('user', None) - self.archive(user=user) + self.discontinue(user=user) return 1, {self.__class__._meta.label: 1} def hard_delete(self):