mirror of
https://github.com/lnbits/lnbits.git
synced 2025-07-28 13:42:42 +02:00
Rollback, see if it fixes json decoding
This commit is contained in:
@@ -3,10 +3,13 @@ import sqlite3
|
||||
|
||||
|
||||
class MegaEncoder(json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
if isinstance(obj, sqlite3.Row):
|
||||
return {k: obj[k] for k in obj.keys()}
|
||||
return obj
|
||||
def default(self, o):
|
||||
if type(o) == sqlite3.Row:
|
||||
val = {}
|
||||
for k in o.keys():
|
||||
val[k] = o[k]
|
||||
return val
|
||||
return o
|
||||
|
||||
|
||||
def megajson(obj):
|
||||
|
Reference in New Issue
Block a user