Skip to content

Commit 9cb3ed3

Browse files
committed
Fix a bug when today.year is not in all_years
AttributeError: 'dict_keys' object has no attribute 'append'
1 parent e432659 commit 9cb3ed3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

naucse/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def runs(year=None, all=None):
112112
# List of years to show in the pagination
113113
# If the current year is not there (no runs that start in the current year
114114
# yet), add it manually
115-
all_years = model.safe_run_years.keys()
115+
all_years = list(model.safe_run_years.keys())
116116
if today.year not in all_years:
117117
all_years.append(today.year)
118118
first_year, last_year = min(all_years), max(all_years)

0 commit comments

Comments
 (0)