mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 02:21:35 +00:00
Fix bug penalizing a non existing taker
This commit is contained in:
parent
980a385528
commit
a0b38d831f
@ -45,7 +45,6 @@ class Logics():
|
||||
queryset = Order.objects.filter(taker=user, status__in=active_order_status)
|
||||
if queryset.exists():
|
||||
return False, {'bad_request':'You are already taker of an active order'}
|
||||
|
||||
return True, None
|
||||
|
||||
def validate_order_size(order):
|
||||
@ -208,6 +207,7 @@ class Logics():
|
||||
def kick_taker(cls, order):
|
||||
''' The taker did not lock the taker_bond. Now he has to go'''
|
||||
# Add a time out to the taker
|
||||
if order.taker:
|
||||
profile = order.taker.profile
|
||||
profile.penalty_expiration = timezone.now() + timedelta(seconds=PENALTY_TIMEOUT)
|
||||
profile.save()
|
||||
|
Loading…
Reference in New Issue
Block a user