forked from LBRYCommunity/lbry-sdk
psycopg2 returns Decimal for SUM()
This commit is contained in:
parent
4e85f34353
commit
8545ab880b
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import textwrap
|
||||
from decimal import Decimal
|
||||
from .util import coins_to_satoshis, satoshis_to_coins
|
||||
|
||||
|
||||
|
@ -36,7 +37,7 @@ def dewies_to_lbc(dewies) -> str:
|
|||
def dict_values_to_lbc(d):
|
||||
lbc_dict = {}
|
||||
for key, value in d.items():
|
||||
if isinstance(value, int):
|
||||
if isinstance(value, (int, Decimal)):
|
||||
lbc_dict[key] = dewies_to_lbc(value)
|
||||
elif isinstance(value, dict):
|
||||
lbc_dict[key] = dict_values_to_lbc(value)
|
||||
|
|
Loading…
Reference in a new issue