Price tracker - fix for sites that supply an empty additional price (#2758)

pull/2605/merge
dgtlmoon 2 weeks ago committed by GitHub
parent ad5d7efbbf
commit f08a1185aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -40,7 +40,7 @@ def _deduplicate_prices(data):
if isinstance(datum.value, list): if isinstance(datum.value, list):
# Process each item in the list # Process each item in the list
normalized_value = set([float(re.sub(r'[^\d.]', '', str(item))) for item in datum.value]) normalized_value = set([float(re.sub(r'[^\d.]', '', str(item))) for item in datum.value if str(item).strip()])
unique_data.update(normalized_value) unique_data.update(normalized_value)
else: else:
# Process single value # Process single value

Loading…
Cancel
Save