|
@@ -439,6 +439,7 @@ class BatchScoreView(View):
|
|
|
categorized = categorize_issues_and_suggestions(all_issues, all_suggestions)
|
|
categorized = categorize_issues_and_suggestions(all_issues, all_suggestions)
|
|
|
|
|
|
|
|
score_result['breakdown']['image_score'] = image_score_result.get('image_score')
|
|
score_result['breakdown']['image_score'] = image_score_result.get('image_score')
|
|
|
|
|
+ score_result['breakdown']['attributes'] = score_result['breakdown']['mandatory_fields']
|
|
|
|
|
|
|
|
results.append({
|
|
results.append({
|
|
|
'sku': sku,
|
|
'sku': sku,
|
|
@@ -462,6 +463,9 @@ class BatchScoreView(View):
|
|
|
'suggestions': all_suggestions
|
|
'suggestions': all_suggestions
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
logger.error(f"[BATCH][GET] Error scoring {sku}: {str(e)}", exc_info=True)
|
|
logger.error(f"[BATCH][GET] Error scoring {sku}: {str(e)}", exc_info=True)
|
|
|
errors.append({'sku': sku, 'error': str(e)})
|
|
errors.append({'sku': sku, 'error': str(e)})
|
|
@@ -704,6 +708,8 @@ class BatchScoreViewV2(View):
|
|
|
|
|
|
|
|
total_time = round(time.time() - start, 2)
|
|
total_time = round(time.time() - start, 2)
|
|
|
|
|
|
|
|
|
|
+ score_result['breakdown']['attributes'] = score_result['breakdown']['mandatory_fields']
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
'sku': sku,
|
|
'sku': sku,
|
|
|
'title': product_data.get('title'),
|
|
'title': product_data.get('title'),
|
|
@@ -725,6 +731,9 @@ class BatchScoreViewV2(View):
|
|
|
'processing_time': total_time
|
|
'processing_time': total_time
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
logger.error(f"[BATCH][{sku}] Error: {e}", exc_info=True)
|
|
logger.error(f"[BATCH][{sku}] Error: {e}", exc_info=True)
|
|
|
return {'sku': sku, 'error': str(e)}
|
|
return {'sku': sku, 'error': str(e)}
|