mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix JSON serialisation bug
This commit is contained in:
parent
06fac90ec2
commit
5f0b3d0fca
@ -267,7 +267,7 @@ class JSONEncoder(json.JSONEncoder):
|
||||
# If the JSON serializer couldn't serialize it
|
||||
# it might be a generator, convert it to a list
|
||||
try:
|
||||
return [json.JSONEncoder.default(self, child_obj)
|
||||
return [self.default(child_obj)
|
||||
for child_obj in obj]
|
||||
except TypeError:
|
||||
# Ok, we're lost, cause the original error
|
||||
|
Loading…
x
Reference in New Issue
Block a user