Skip to content

Commit

Permalink
fix: removed functional programing code
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Oct 27, 2023
1 parent 1af5472 commit 0528217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lms/www/batch/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def get_page_extensions(context):

def get_neighbours(current, lessons):
numbers = [lesson.number for lesson in lessons]
tuples_list = [tuple(map(int, s.split("."))) for s in numbers] # noqa
tuples_list = [tuple(int(x) for x in s.split(".")) for s in numbers]
sorted_tuples = sorted(tuples_list)
sorted_numbers = [".".join(map(str, t)) for t in sorted_tuples] # noqa
sorted_numbers = [".".join(str(num) for num in t) for t in sorted_tuples]
index = sorted_numbers.index(current)

return {
Expand Down

0 comments on commit 0528217

Please sign in to comment.