Fixed ship add in backend
This commit is contained in:
parent
97a9e0bcf7
commit
941b5e70fb
@ -110,7 +110,7 @@ class InputValidationShip():
|
|||||||
ships = json.loads(response)
|
ships = json.loads(response)
|
||||||
|
|
||||||
# extract only the 'imo' values
|
# extract only the 'imo' values
|
||||||
ship_imos = [ship.get("imo") for ship in ships if not ship.deleted]
|
ship_imos = [ship.get("imo") for ship in ships if not ship.get("deleted")]
|
||||||
|
|
||||||
# check, if the imo in the POST-request already exists in the list
|
# check, if the imo in the POST-request already exists in the list
|
||||||
imo_already_exists = loadedModel.get("imo") in ship_imos
|
imo_already_exists = loadedModel.get("imo") in ship_imos
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user