| Line 169... |
Line 169... |
| 169 |
ds_item.bestDealValue = item.bestDealValue
|
169 |
ds_item.bestDealValue = item.bestDealValue
|
| 170 |
ds_item.bestSellingRank = item.bestSellingRank
|
170 |
ds_item.bestSellingRank = item.bestSellingRank
|
| 171 |
|
171 |
|
| 172 |
ds_item.defaultForEntity = item.defaultForEntity
|
172 |
ds_item.defaultForEntity = item.defaultForEntity
|
| 173 |
ds_item.risky = item.risky
|
173 |
ds_item.risky = item.risky
|
| 174 |
ds_item.similarityIndex = item.similarityIndex
|
- |
|
| 175 |
ds_item.updatedOn = datetime.datetime.now()
|
174 |
ds_item.updatedOn = datetime.datetime.now()
|
| 176 |
|
175 |
|
| 177 |
session.commit();
|
176 |
session.commit();
|
| 178 |
return ds_item.id
|
177 |
return ds_item.id
|
| 179 |
|
178 |
|
| Line 256... |
Line 255... |
| 256 |
ds_item.bestDealText = item.bestDealText
|
255 |
ds_item.bestDealText = item.bestDealText
|
| 257 |
if item.bestSellingRank:
|
256 |
if item.bestSellingRank:
|
| 258 |
ds_item.bestSellingRank = item.bestSellingRank
|
257 |
ds_item.bestSellingRank = item.bestSellingRank
|
| 259 |
ds_item.defaultForEntity = item.defaultForEntity
|
258 |
ds_item.defaultForEntity = item.defaultForEntity
|
| 260 |
ds_item.risky = item.risky
|
259 |
ds_item.risky = item.risky
|
| 261 |
if item.similarityIndex:
|
- |
|
| 262 |
ds_item.similarityIndex = item.similarityIndex
|
- |
|
| 263 |
|
260 |
|
| 264 |
# Check if a similar item already exists in our database
|
261 |
# Check if a similar item already exists in our database
|
| 265 |
similar_item = Item.query.filter_by(product_group=item.productGroup, brand = item.brand, model_number=item.modelNumber, hotspotCategory=item.hotspotCategory).first()
|
262 |
similar_item = Item.query.filter_by(product_group=item.productGroup, brand = item.brand, model_number=item.modelNumber, hotspotCategory=item.hotspotCategory).first()
|
| 266 |
print "[SIMILAR ITEM FOUND:] FOR {0} {1} {2} {3} {4}".format(item.productGroup, item.brand, item.modelNumber, item.hotspotCategory, item.color)
|
263 |
print "[SIMILAR ITEM FOUND:] FOR {0} {1} {2} {3} {4}".format(item.productGroup, item.brand, item.modelNumber, item.hotspotCategory, item.color)
|
| 267 |
|
264 |
|