From 11071996aff5511012eb44fae5673f14125795bb Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Wed, 14 May 2025 12:38:40 +0300 Subject: [PATCH] Features: 1) Add return self to bulk_add_products; 2) Add return self to bulk_remove_products; Fixes: None; Extra: None; --- core/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/models.py b/core/models.py index 7638cfdb..32f6ae03 100644 --- a/core/models.py +++ b/core/models.py @@ -1185,9 +1185,13 @@ class Wishlist(NiceModel): def bulk_add_products(self, product_uuids): self.products.add(*Product.objects.filter(uuid__in=product_uuids)) + return self + def bulk_remove_products(self, product_uuids): self.products.remove(*Product.objects.filter(uuid__in=product_uuids)) + return self + class DigitalAssetDownload(NiceModel): is_publicly_visible = False