Files
Fulfillment-Backend/barcodes/attributes/inn_attribute_getter.py
2024-05-10 16:48:43 +03:00

13 lines
399 B
Python

from barcodes.attributes.base import BaseAttributeGetter
from models import Product, Client, ClientDetails
class InnAttributeGetter(BaseAttributeGetter):
def get_value(self, product: Product):
client: Client = product.client
client_details: ClientDetails = client.details
result = client_details.inn
if not result:
result = ''
return result