Skip to content

Commit

Permalink
fix bug with group
Browse files Browse the repository at this point in the history
  • Loading branch information
LabInn committed Nov 17, 2022
1 parent 58a3065 commit 41c5b94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "schedule_parser_portal_petrocollege"
version = "0.0.3"
version = "0.0.5"
authors = [
{ name="Andrei V. Berezhkov", email="[email protected]" },
]
Expand Down
4 changes: 2 additions & 2 deletions src/Lesson.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self, string_to_parse):
self.discipline = ''
self.room = ''
self.building = '0'
self.groups = [string_to_parse[:6].strip()]
self.groups = [Lesson.get_course(string_to_parse[:6].strip())]
self.__current_string = string_to_parse[6:].strip()
self.is_dop = False
self.subgroup = 0
Expand Down Expand Up @@ -83,7 +83,7 @@ def get_course(group_name):
year_start = year_end - 10
for i in range(year_start, year_end, 1):
year = str(i)
if year[-1] == group_name[1]:
if (year[-1] == group_name[1]):
course = year_end - i + 1
group_data = {"group": group_name, "year": year, "course": course}
return group_data

0 comments on commit 41c5b94

Please sign in to comment.