Load data only once

This commit is contained in:
cyril 2021-09-02 07:05:51 +02:00
commit 04b7c01509
2 changed files with 12 additions and 10 deletions

View file

@ -150,9 +150,7 @@ def find_significant_other(mariages: list, uid: int) -> (int, str):
return -1, ''
def create_events_from_span(start: date, end: date, members_file: str, mariages_file: str) -> list:
id_to_person = load_persons_to_dict(members_file)
mariages = load_mariage_to_list(mariages_file)
def create_events_from_span(start: date, end: date, id_to_person: dict, mariages: list) -> list:
cur_year = start.year
events = []