Merge pull request #15 from puls200/feature/hotfix_20231110

Feature/hotfix 20231110
This commit is contained in:
Daniel Schick 2023-11-10 18:07:12 +01:00 committed by GitHub
commit fd5bd76db2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,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:
@ -833,6 +841,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