Convert year comparison to integer for accuracy
This commit is contained in:
1 parent
84616c6a9b
commit
59007a6145
1 file changed
+1
-1
+1
-1
@@ -186,7 +186,7 @@ def find_newest(notebooks, label='New', year=new_year) -> None:
|
||||
"""Mutate `notebooks['New']` to have a collection of newest notebooks."""
|
||||
for category in notebooks:
|
||||
for line in notebooks[category]:
|
||||
if line[1] >= year:
|
||||
if int(line[1]) >= int(year):
|
||||
notebooks[label].append(line)
|
||||
notebooks[label].sort(key=lambda line: (-line[1], line[0]))
|
||||
|
||||
|
||||
Reference in new issue
Block a user