feat: attrs on product
This commit is contained in:
11
barcodes/attributes/brand_attribute_getter.py
Normal file
11
barcodes/attributes/brand_attribute_getter.py
Normal 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
|
||||
Reference in New Issue
Block a user