We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 849a6a3 commit 12b25e1Copy full SHA for 12b25e1
luasrc/actions/models/add_model.lua
@@ -25,15 +25,15 @@ private_vibescript.add_model = function(config_json)
25
for i = 1, #config_json.models do
26
if config_json.models[i].name == model_name then
27
alreay_exists = true
28
- config_json.models[#config_json.models + 1] = model
29
-
30
end
31
32
33
34
if not alreay_exists then
35
config_json.models[#config_json.models + 1] = model
36
+ if alreay_exists then
+ error("Model with name " .. model_name .. " already exists", 0)
+ end
37
38
private_vibescript.save_config_json(config_json)
39
0 commit comments