Fixed a bug in quota locking

This commit is contained in:
Raphael Michel
2015-07-14 20:31:19 +02:00
parent 89bad60621
commit 1afc23611d
2 changed files with 3 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ def check_positions(event, dt, positions, quotas_locked):
for quota in quotas:
# Lock the quota, so no other thread is allowed to perform sales covered by this
# quota while we're doing so.
if quota not in quotas_locked:
if quota.identity not in [q.identity for q in quotas_locked]:
quota.lock()
quotas_locked.add(quota)
avail = quota.availability()