fixing the 'KeyError' when using an empty times dataframe. Returning 'green'
This commit is contained in:
parent
6ce6e882e9
commit
836c1aa802
@ -39,6 +39,9 @@ class ValidationRules(ValidationRuleFunctions):
|
||||
if len(spm.loc[spm["shipcall_id"]==shipcall.id])==0:
|
||||
return (StatusFlags.GREEN.value, [])
|
||||
|
||||
if len(df_times)==0:
|
||||
return (StatusFlags.GREEN.value, [])
|
||||
|
||||
# filter by shipcall id
|
||||
df_times = self.sql_handler.get_times_of_shipcall(shipcall)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user