mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-08-21 13:18:11 -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.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…
Add table
Add a link
Reference in a new issue