12 lines
279 B
Python
12 lines
279 B
Python
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
|