From a94a99e99b6bdf4bdf10e9d8d6e2f72eb34f2bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 23 Sep 2021 23:12:35 +0200 Subject: [PATCH] Ensure that objects in the Pool has __slots__ issue10719 review375361002 --- product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product.py b/product.py index aaae33cc05..467a5b0d56 100644 --- a/product.py +++ b/product.py @@ -27,6 +27,7 @@ URL_EXTERNAL_BASE = config.get('product', 'image_base', default=http_host()) class ImageURLMixin: + __slots__ = () __image_url__ = None images = None image_url = fields.Function(fields.Char("Image URL"), '_get_image_url') @@ -97,6 +98,7 @@ class Product(ImageURLMixin, metaclass=PoolMeta): class ImageMixin: + __slots__ = () image = fields.Binary( "Image", file_id=file_id, store_prefix=store_prefix, required=True) image_id = fields.Char("Image ID", readonly=True)