correcting the open issues from 09.11.2023 (0001 A-M was previously commited, 0006A+B are corrected herein)

This commit is contained in:
scopesorting 2023-11-10 17:50:01 +01:00
parent d99188dc98
commit b2cde8b6f5

View File

@ -800,7 +800,15 @@ class ValidationRuleFunctions(ValidationRuleBaseFunctions):
# when one of the two values is null, the state is GREEN
if (times_agency.berth_id is None) or (times_terminal.berth_id is None):
return (StatusFlags.GREEN, None)
# when one of the two values is null, the state is GREEN
if (pd.isnull(times_agency.berth_id)) or (pd.isnull(times_terminal.berth_id)):
return (StatusFlags.GREEN, None)
if shipcall.type in [ShipcallType.OUTGOING.value, ShipcallType.SHIFTING.value]:
return (StatusFlags.GREEN, None)
# only incoming shipcalls matter. The other ones are not relevant for the berth selection
violation_state = times_agency.berth_id!=times_terminal.berth_id
if violation_state:
@ -825,6 +833,14 @@ class ValidationRuleFunctions(ValidationRuleBaseFunctions):
# when one of the two values is null, the state is GREEN
if (times_agency.pier_side is None) or (times_terminal.pier_side is None):
return (StatusFlags.GREEN, None)
# when one of the two values is null, the state is GREEN
if (pd.isnull(times_agency.pier_side)) or (pd.isnull(times_terminal.pier_side)):
return (StatusFlags.GREEN, None)
# only incoming shipcalls matter. The other ones are not relevant for the pier_side selection
if shipcall.type in [ShipcallType.OUTGOING.value, ShipcallType.SHIFTING.value]:
return (StatusFlags.GREEN, None)
violation_state = times_agency.pier_side!=times_terminal.pier_side