Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load error if a bot has not optional parameters field in runtime configuration #237

Open
ghost opened this issue Feb 26, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2021

If a bot has no parameters, like:

...
    "bot-id": {
        "name": "foobar bot",
        "group": "Expert",
        "module": "intelmq.bots.experts.foobar",
        "description": "Foobar descr",
        "enabled": "true"
    }
...

a user gets this error:
image

(Which also points the user to the completely wrong direction)
I suspect that the code which needs to be adapted is here:

app.bots[bot_group][bot_name] = {
'name': bot_name,
'group': bot_group,
'module': bot['module'],
'description': bot['description'],
'enabled': true,
'parameters': bot['parameters'],
'run_mode': 'continuous'
};
for (let parameter in bot['parameters']) {
var value = bot['parameters'][parameter];
app.bots[bot_group][bot_name]['parameters'][parameter] = value;
}

@ghost ghost added the bug label Feb 26, 2021
@ghost ghost added this to the 2.3.0 milestone Feb 26, 2021
@ghost ghost changed the title Load error if a bot has not optional parameters field in runtime config Load error if a bot has not optional parameters field in runtime configuration Mar 4, 2021
@ghost ghost modified the milestones: 2.3.0, 2.3.1 Mar 8, 2021
@ghost ghost removed this from the 2.3.1 milestone Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants