mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-02 03:22:40 +02:00
fix: get_device_info checked for 'data' attr instead of 'payload'
Event objects use 'payload', not 'data'. This bug was latent because the cache was always populated during connect — only exposed after the cache invalidation fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1986,8 +1986,8 @@ class DeviceManager:
|
||||
|
||||
try:
|
||||
event = self.execute(self.mc.commands.send_appstart())
|
||||
if event and hasattr(event, 'data'):
|
||||
self._self_info = getattr(event, 'payload', {})
|
||||
if event and hasattr(event, 'payload'):
|
||||
self._self_info = event.payload
|
||||
return dict(self._self_info)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to get device info: {e}")
|
||||
|
||||
Reference in New Issue
Block a user