mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 09:54:21 +01:00
Rollback, see if it fixes json decoding
This commit is contained in:
parent
5a74f52712
commit
a245621ab8
@ -3,10 +3,13 @@ import sqlite3
|
|||||||
|
|
||||||
|
|
||||||
class MegaEncoder(json.JSONEncoder):
|
class MegaEncoder(json.JSONEncoder):
|
||||||
def default(self, obj):
|
def default(self, o):
|
||||||
if isinstance(obj, sqlite3.Row):
|
if type(o) == sqlite3.Row:
|
||||||
return {k: obj[k] for k in obj.keys()}
|
val = {}
|
||||||
return obj
|
for k in o.keys():
|
||||||
|
val[k] = o[k]
|
||||||
|
return val
|
||||||
|
return o
|
||||||
|
|
||||||
|
|
||||||
def megajson(obj):
|
def megajson(obj):
|
||||||
|
Loading…
Reference in New Issue
Block a user