def has_uuid(uuid, product_data): has = is_correct_uuid(uuid) if not has: logger.info( NOT_SAVE_TEMPLATE.format(entity='Product', name=product_data['name'], field='uuid')) return has
def has_all_prices(_, product_data): price_types = price_file.extra_options['price_types'] has = all(product_data.get(price_type) for price_type in price_types) if not has: logger.info( NOT_SAVE_TEMPLATE.format(entity='Product', name=product_data['name'], field='price')) return has
def has_uuid(uuid, product_data): has = is_correct_uuid(uuid) if not has: logger.info(NOT_SAVE_TEMPLATE.format( entity='Product', name=product_data['name'], field='uuid' )) return has
def has_vendor_code(_, product_data): has = bool(product_data['vendor_code']) if not has: logger.info( NOT_SAVE_TEMPLATE.format(entity='Product', name=product_data['name'], field='vendor_code')) return has
def has_vendor_code(_, product_data): has = bool(product_data['vendor_code']) if not has: logger.info(NOT_SAVE_TEMPLATE.format( entity='Product', name=product_data['name'], field='vendor_code' )) return has
def has_all_prices(_, product_data): price_types = price_file.extra_options['price_types'] has = all( product_data.get(price_type) for price_type in price_types ) if not has: logger.info(NOT_SAVE_TEMPLATE.format( entity='Product', name=product_data['name'], field='price' )) return has