File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,17 @@ def main():
26
26
goto_waitinglist_page ()
27
27
28
28
persons_on_waiting_list = extract_persons_on_waiting_list ()
29
+
30
+ if not os .path .exists (PATH_TO_DB ):
31
+ create_and_seed_db (persons_on_waiting_list )
32
+ exit ()
33
+
29
34
saved_persons_on_waiting_list = fetch_saved_waiting_list_persons ()
30
35
31
- # TODO: This whole section sucks ass - ie. it's confusing - so refactor that thang ..
32
36
persons_not_in_saved_waiting_list = []
33
- if os .path .exists (PATH_TO_DB ):
34
- for person in persons_on_waiting_list :
35
- if person not in saved_persons_on_waiting_list :
36
- persons_not_in_saved_waiting_list .append (person )
37
-
38
- else :
39
- create_and_seed_db (persons_on_waiting_list )
37
+ for person in persons_on_waiting_list :
38
+ if person not in saved_persons_on_waiting_list :
39
+ persons_not_in_saved_waiting_list .append (person )
40
40
41
41
if persons_not_in_saved_waiting_list :
42
42
save_new_persons_to_db (persons_not_in_saved_waiting_list )
You can’t perform that action at this time.
0 commit comments