Don't check for lock start date
This commit is contained in:
parent
cd2866eaec
commit
0daf77f313
@ -706,8 +706,7 @@ class PairLock(_DECL_BASE):
|
|||||||
if not now:
|
if not now:
|
||||||
now = datetime.now(timezone.utc)
|
now = datetime.now(timezone.utc)
|
||||||
|
|
||||||
filters = [func.datetime(PairLock.lock_time) <= now,
|
filters = [func.datetime(PairLock.lock_end_time) >= now,
|
||||||
func.datetime(PairLock.lock_end_time) >= now,
|
|
||||||
# Only active locks
|
# Only active locks
|
||||||
PairLock.active.is_(True), ]
|
PairLock.active.is_(True), ]
|
||||||
if pair:
|
if pair:
|
||||||
@ -742,7 +741,6 @@ class PairLock(_DECL_BASE):
|
|||||||
|
|
||||||
return PairLock.query.filter(
|
return PairLock.query.filter(
|
||||||
PairLock.pair == pair,
|
PairLock.pair == pair,
|
||||||
func.datetime(PairLock.lock_time) <= now,
|
|
||||||
func.datetime(PairLock.lock_end_time) >= now,
|
func.datetime(PairLock.lock_end_time) >= now,
|
||||||
# Only active locks
|
# Only active locks
|
||||||
PairLock.active.is_(True),
|
PairLock.active.is_(True),
|
||||||
|
Loading…
Reference in New Issue
Block a user