diff --git a/src/server/BreCal/database/sql_handler.py b/src/server/BreCal/database/sql_handler.py index f715b4b..f34f345 100644 --- a/src/server/BreCal/database/sql_handler.py +++ b/src/server/BreCal/database/sql_handler.py @@ -207,7 +207,8 @@ class SQLHandler(): returns: participant_id_list, where every element is an int """ df = self.df_dict.get("shipcall_participant_map") - df = df.set_index('shipcall_id', inplace=False) + if 'shipcall_id' in list(df.columns): + df = df.set_index('shipcall_id', inplace=False) # the 'if' call is needed to ensure, that no Exception is raised, when the shipcall_id is not present in the df participant_id_list = df.loc[shipcall_id, "participant_id"].tolist() if shipcall_id in list(df.index) else []