From 2187e097dfba256744ba9047500cf0fb1e429c35 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sun, 6 Oct 2019 06:24:34 +0530 Subject: [PATCH] Fixing small error with the previous commit --- ranchimallflo_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranchimallflo_api.py b/ranchimallflo_api.py index 67e71b1..6777c90 100644 --- a/ranchimallflo_api.py +++ b/ranchimallflo_api.py @@ -721,7 +721,6 @@ async def getLatestTransactionDetails(): async def getLatestBlockDetails(): limit = request.args.get('limit') - int(limit) dblocation = dbfolder + '/latestCache.db' if os.path.exists(dblocation): @@ -733,6 +732,7 @@ async def getLatestBlockDetails(): if limit is None: c.execute('''SELECT * FROM ( SELECT * FROM latestBlocks ORDER BY blockNumber DESC LIMIT 4) ORDER BY id ASC;''') else: + int(limit) c.execute('SELECT * FROM ( SELECT * FROM latestBlocks ORDER BY blockNumber DESC LIMIT {}) ORDER BY id ASC;'.format(limit)) latestBlocks = c.fetchall() c.close()