when a ship is deleted, the IMO is no longer considered to exist

This commit is contained in:
Max Metz 2024-09-17 15:33:48 +02:00
parent 8df9034574
commit 5e50e09966

View File

@ -97,7 +97,7 @@ class InputValidationShip():
ships = json.loads(response)
# extract only the 'imo' values
ship_imos = [ship.get("imo") for ship in ships]
ship_imos = [ship.get("imo") for ship in ships if not ship.deleted]
# check, if the imo in the POST-request already exists in the list
imo_already_exists = loadedModel.get("imo") in ship_imos