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 99b05ad commit 0ebf66bCopy full SHA for 0ebf66b
modules/api/api.py
@@ -230,14 +230,10 @@ def get_config(self):
230
231
return options
232
233
- def set_config(self, req: OptionsModel):
234
- # currently req has all options fields even if you send a dict like { "send_seed": false }, which means it will
235
- # overwrite all options with default values.
236
- raise RuntimeError('Setting options via API is not supported')
237
-
238
- reqDict = vars(req)
239
- for o in reqDict:
240
- setattr(shared.opts, o, reqDict[o])
+ def set_config(self, req: Dict[str, Any]):
+
+ for o in req:
+ setattr(shared.opts, o, req[o])
241
242
shared.opts.save(shared.config_filename)
243
return
0 commit comments