feat: attrs on product

This commit is contained in:
2024-05-10 16:18:26 +03:00
parent bde69f9db8
commit 74982b9acf
6 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
from barcodes.attributes.base import BaseAttributeGetter
from models import Product
class BrandAttributeGetter(BaseAttributeGetter):
def get_value(self, product: Product):
result = product.brand
if not result:
result = ''
return result