def handle_shop_product_post_save(sender, instance, **kwargs): if isinstance(instance, Category): for shop_product in instance.shop_products.all(): bump_shop_product_signal_handler(sender, shop_product, **kwargs) bump_prices_for_shop_product(shop_product) else: bump_shop_product_signal_handler(sender, instance, **kwargs) bump_prices_for_shop_product(instance)
def handle_shop_product_post_save(sender, instance, **kwargs): if isinstance(instance, Category): for shop_product in instance.shop_products.all(): bump_shop_product_signal_handler(sender, shop_product, **kwargs) bump_prices_for_shop_product(shop_product) else: bump_shop_product_signal_handler(sender, instance, **kwargs) bump_prices_for_shop_product(instance)
def handle_supplier_post_save(sender, instance, **kwargs): bump_shop_product_signal_handler( sender, instance.shop_products.all().values_list("pk", flat=True), **kwargs) for shop_id in set(instance.shop_products.all().values_list("shop_id", flat=True)): bump_prices_for_shop_product(shop_id) context_cache_item_bumped.send(sender=Shop, shop_id=shop_id)
def handle_supplier_post_save(sender, instance, **kwargs): for shop_product in instance.shop_products.all(): bump_shop_product_signal_handler(sender, shop_product, **kwargs) bump_prices_for_shop_product(shop_product)
def handle_supplier_post_save(sender, instance, **kwargs): for shop_product in instance.shop_products.all(): bump_shop_product_signal_handler(sender, shop_product, **kwargs) bump_prices_for_shop_product(shop_product)
def handle_shop_product_post_save(sender, instance, **kwargs): bump_shop_product_signal_handler(sender, instance, **kwargs) bump_prices_for_shop_product(instance)