mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-04-18 18:15:48 -04:00
fix bug on empty db
This commit is contained in:
parent
29ead85025
commit
33a6a9b8a2
@ -127,4 +127,7 @@ def get_highest_block(nettype, crypto):
|
||||
Node.nettype == nettype,
|
||||
Node.crypto == crypto
|
||||
).order_by(Node.last_height.desc()).limit(1).first()
|
||||
return highest.last_height
|
||||
if highest:
|
||||
return highest.last_height
|
||||
else:
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user