Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 50dd1c5

Browse files
author
Mauro Doglio
committed
Fix undefined variable errors
1 parent 8d1e865 commit 50dd1c5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

taar/contrib/django/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
def get_client_recommendations(request):
1414
form = AddonRecommendationsForm()
1515
recommendations = []
16+
error_text = ""
1617
if request.method == 'POST':
1718
form = AddonRecommendationsForm(data=request.POST)
1819
if form.is_valid():
@@ -31,11 +32,11 @@ def get_client_recommendations(request):
3132
error_text = ("It wasn't possible to retrieve"
3233
"the list of addons")
3334
cache.set('addon_mapping', addon_mapping)
34-
recommendations_names = [addon_mapping.get(r, "")
35-
for r in recommendations]
35+
recommendations = [addon_mapping.get(r, "")
36+
for r in recommendations]
3637
context = {
3738
'form': form,
38-
'recommendations': recommendations_names,
39+
'recommendations': recommendations,
3940
'error_text': error_text
4041
}
4142

0 commit comments

Comments
 (0)