feat: attrs on product
This commit is contained in:
11
barcodes/attributes/company_name_attribute_getter.py
Normal file
11
barcodes/attributes/company_name_attribute_getter.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from barcodes.attributes.base import BaseAttributeGetter
|
||||
from models import Product, Client
|
||||
|
||||
|
||||
class CompanyNameAttributeGetter(BaseAttributeGetter):
|
||||
def get_value(self, product: Product):
|
||||
client: Client = product.client
|
||||
result = client.company_name
|
||||
if not result:
|
||||
result = ''
|
||||
return result
|
||||
Reference in New Issue
Block a user