Fix edge case with missing dealer, and update README

This commit is contained in:
Dave Gallant
2023-02-25 10:31:20 -05:00
parent 85b6c979bb
commit ad58db345e
2 changed files with 11 additions and 2 deletions

View File

@@ -63,7 +63,10 @@ def look_for_matches(
for expression in config.expressions:
expression = expression.lower()
topic_title = topic.title.lower()
dealer_name = topic.offer.dealer_name.lower()
if topic.offer.dealer_name:
dealer_name = topic.offer.dealer_name.lower()
else:
dealer_name = ""
if re.search(expression, topic_title):
found_match = True
logger.debug(