Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -79,11 +79,11 @@ def get_topics_within_timeframe(subject, allowed_time, start_subtopic):
|
|
79 |
continue
|
80 |
|
81 |
for subtopic in chapter["subtopics"]:
|
82 |
-
|
83 |
-
if start_subtopic == "" or subtopic["subtopic"] == start_subtopic:
|
84 |
start_collecting = True
|
|
|
85 |
|
86 |
-
if start_collecting and subtopic
|
87 |
time_spent += float(subtopic["subtopic_hours"])
|
88 |
if time_spent <= allowed_time:
|
89 |
collected_subtopics.append({
|
|
|
79 |
continue
|
80 |
|
81 |
for subtopic in chapter["subtopics"]:
|
82 |
+
if subtopic["subtopic"] == start_subtopic:
|
|
|
83 |
start_collecting = True
|
84 |
+
continue
|
85 |
|
86 |
+
if start_collecting and subtopic["subtopic_hours"]:
|
87 |
time_spent += float(subtopic["subtopic_hours"])
|
88 |
if time_spent <= allowed_time:
|
89 |
collected_subtopics.append({
|