def fill_object_attributes(self, product: Product): product.name = trim_with_elipsis(self.product_infos["titre"], 140) product.datePublished = read_things_date( self.product_infos["date_parution"]) product.type = self.product_type product.extraData = self.product_extra_data.copy() product.extraData.update(get_extra_data_from_infos(self.product_infos)) if self.product_infos["url_extrait_pdf"] != "": if product.mediaUrls is None: product.mediaUrls = [] product.mediaUrls.append(self.product_infos["url_extrait_pdf"])
def fill_object_attributes(self, product: Product): product.name = trim_with_elipsis(self.product_infos["titre"], 140) product.datePublished = read_things_date( self.product_infos["date_parution"]) subcategory = subcategories.ALL_SUBCATEGORIES_DICT[ self.product_subcategory_id] product.subcategoryId = subcategory.id product.extraData = self.product_extra_data.copy() product.extraData.update(get_extra_data_from_infos(self.product_infos)) if self.product_infos["url_extrait_pdf"] != "": if product.mediaUrls is None: product.mediaUrls = [] product.mediaUrls.append(self.product_infos["url_extrait_pdf"])