diff --git a/osmclient/sol005/osm_api_object.py b/osmclient/sol005/osm_api_object.py index 780bb04663bace2cb68e10b71afcefa56496420d..59065a72099de9beb8ff489fcabfd3205b57c9e5 100644 --- a/osmclient/sol005/osm_api_object.py +++ b/osmclient/sol005/osm_api_object.py @@ -274,9 +274,12 @@ class GenericOSMAPIObject(ABC): if resp: resp = json.loads(resp) self._logger.debug(f"Resp: {resp}") - if not resp or "_id" not in resp: + if not resp or ("_id" not in resp and "id" not in resp): raise ClientException("Unexpected response from server - {}".format(resp)) - print(resp["_id"]) + if "id" in resp: + print(resp["id"]) + else: + print(resp["_id"]) if tempdir: tempdir.cleanup()