aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lua/lua_task.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index eabbb2609..b095de8e7 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -5661,6 +5661,13 @@ lua_task_set_settings (lua_State *L)
if (settings != NULL && task != NULL) {
+ if (task->settings) {
+ /* Do not allow to set settings on top of the existing ones */
+ ucl_object_unref (settings);
+
+ return luaL_error (L, "invalid invocation: settings has been already set");
+ }
+
metric_elt = ucl_object_lookup (settings, DEFAULT_METRIC);
if (metric_elt) {