mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-08-21 15:08:05 -04:00
fix bug on empty db
This commit is contained in:
parent
29ead85025
commit
33a6a9b8a2
1 changed files with 4 additions and 1 deletions
|
@ -127,4 +127,7 @@ def get_highest_block(nettype, crypto):
|
||||||
Node.nettype == nettype,
|
Node.nettype == nettype,
|
||||||
Node.crypto == crypto
|
Node.crypto == crypto
|
||||||
).order_by(Node.last_height.desc()).limit(1).first()
|
).order_by(Node.last_height.desc()).limit(1).first()
|
||||||
|
if highest:
|
||||||
return highest.last_height
|
return highest.last_height
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue