Update app.py
Browse files
app.py
CHANGED
|
@@ -60,6 +60,14 @@ def process_request(id_textbox, installer_textbox,boot_state_textbox,verify_text
|
|
| 60 |
lock_screen_type_textbox,notification_visibility_textbox, app_permissions_textbox):
|
| 61 |
results = []
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
dict_of_device_data_to_save = {"id": id_textbox,
|
| 64 |
"installer": installer_textbox,
|
| 65 |
"boot_state": boot_state_textbox,
|
|
@@ -79,7 +87,7 @@ def process_request(id_textbox, installer_textbox,boot_state_textbox,verify_text
|
|
| 79 |
"lock_screen_timeout": lock_screen_timeout_textbox,
|
| 80 |
"lock_screen_type": lock_screen_type_textbox,
|
| 81 |
"notification_visibility": notification_visibility_textbox,
|
| 82 |
-
"app_permissions_textbox":
|
| 83 |
db = easy_db.DataBase('device_data.db')
|
| 84 |
|
| 85 |
|
|
|
|
| 60 |
lock_screen_type_textbox,notification_visibility_textbox, app_permissions_textbox):
|
| 61 |
results = []
|
| 62 |
|
| 63 |
+
apps_and_permissions = app_permissions_textbox.split("&&")
|
| 64 |
+
permissions_dict = {}
|
| 65 |
+
for app_and_permissions in apps_and_permissions:
|
| 66 |
+
app, permissions = app_and_permissions.split("*******")
|
| 67 |
+
permissions = permissions.split("-")
|
| 68 |
+
permissions_dict[app] = permissions
|
| 69 |
+
|
| 70 |
+
|
| 71 |
dict_of_device_data_to_save = {"id": id_textbox,
|
| 72 |
"installer": installer_textbox,
|
| 73 |
"boot_state": boot_state_textbox,
|
|
|
|
| 87 |
"lock_screen_timeout": lock_screen_timeout_textbox,
|
| 88 |
"lock_screen_type": lock_screen_type_textbox,
|
| 89 |
"notification_visibility": notification_visibility_textbox,
|
| 90 |
+
"app_permissions_textbox":permissions_dict}
|
| 91 |
db = easy_db.DataBase('device_data.db')
|
| 92 |
|
| 93 |
|