mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-17 23:13:49 +02:00
Allow appliances to be loaded from file without the appliance id.
Fixes https://github.com/GNS3/gns3-gui/issues/2639.
This commit is contained in:
parent
6a2d1e9b33
commit
1067f71952
@ -341,7 +341,7 @@ class Controller:
|
||||
if "appliances" in controller_settings:
|
||||
for appliance_settings in controller_settings["appliances"]:
|
||||
try:
|
||||
appliance = Appliance(appliance_settings["appliance_id"], appliance_settings)
|
||||
appliance = Appliance(appliance_settings.get("appliance_id"), appliance_settings)
|
||||
self._appliances[appliance.id] = appliance
|
||||
except jsonschema.ValidationError as e:
|
||||
message = "Cannot load appliance with JSON data '{}': {}".format(appliance_settings, e.message)
|
||||
|
Loading…
Reference in New Issue
Block a user