MCPcopy Create free account
hub / github.com/WebODM/WebODM / save

Function save

coreplugins/tasknotification/config.py:22–39  ·  view source on GitHub ↗
(data: dict)

Source from the content-addressed store, hash-verified

20
21
22def save(data: dict):
23 from app.plugins.functions import get_current_plugin
24 plugin = get_current_plugin(only_active=True)
25 data_store = plugin.get_global_data_store()
26
27 data_store.set_string('smtp_server', data.get('smtp_server')),
28 data_store.set_int('smtp_port', data.get('smtp_port')),
29 data_store.set_string('smtp_username', data.get('smtp_username')),
30 data_store.set_string('smtp_password', data.get('smtp_password')),
31 data_store.set_bool('smtp_use_tls', data.get('smtp_use_tls')),
32 data_store.set_string('smtp_from_address', data.get('smtp_from_address')),
33 data_store.set_string('smtp_to_address', data.get('smtp_to_address')),
34 data_store.set_string('notification_app_name',
35 data.get('notification_app_name')),
36 data_store.set_bool('notify_task_completed',
37 data.get('notify_task_completed')),
38 data_store.set_bool('notify_task_failed', data.get('notify_task_failed')),
39 data_store.set_bool('notify_task_removed', data.get('notify_task_removed'))

Callers

nothing calls this directly

Calls 6

get_current_pluginFunction · 0.90
get_global_data_storeMethod · 0.80
set_stringMethod · 0.80
set_intMethod · 0.80
set_boolMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected