From 59bd1ce29113bf779ad2e140b96222fc564fe19e Mon Sep 17 00:00:00 2001 From: Cedric Richter Date: Wed, 4 Dec 2024 17:33:12 +0100 Subject: [PATCH] Fix a potential identifier bug --- .../tasks/webshop/web_agent_site/attributes/generate_attrs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/tasks/webshop/web_agent_site/attributes/generate_attrs.py b/src/server/tasks/webshop/web_agent_site/attributes/generate_attrs.py index 9b13966..ca34042 100644 --- a/src/server/tasks/webshop/web_agent_site/attributes/generate_attrs.py +++ b/src/server/tasks/webshop/web_agent_site/attributes/generate_attrs.py @@ -97,7 +97,7 @@ def get_corpus( for key in keys: if key == 'review': rs = p['review']['reviews'] - if r is not None: + if rs is not None: text_ = ' '.join([r['review'].lower() for r in rs]) else: text_ = ''