Skip to content

Commit 6f449f1

Browse files
dbieberclaude
andcommitted
Fix Wi-Fi network configuration in settings server
The settings UI was correctly updating Wi-Fi networks in Redis, but not properly calling wifi.save_networks() which ensures proper handling before updating wpa_supplicant configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a50b4e3 commit 6f449f1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

gonotego/settings/server.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,18 @@ def do_POST(self):
175175

176176
try:
177177
settings.set(key, value)
178-
# If we're updating WiFi networks, update the wpa_supplicant.conf file
178+
# If we're updating WiFi networks, save networks and update the wpa_supplicant.conf file
179179
if key == 'WIFI_NETWORKS':
180180
try:
181+
# Parse the value to ensure it's in the correct format
182+
if isinstance(value, str):
183+
networks = json.loads(value)
184+
else:
185+
networks = value
186+
187+
# Save networks using the wifi module's function
188+
wifi.save_networks(networks)
189+
181190
# Update wpa_supplicant configuration using the wifi module
182191
wifi.update_wpa_supplicant_config()
183192
wifi.reconfigure_wifi()

0 commit comments

Comments
 (0)