1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Removed "free old macs??"

This commit is contained in:
Adolfo Gómez García 2017-03-22 11:26:38 +01:00
parent 17196ac31d
commit 8b644d4fec

View File

@ -129,8 +129,8 @@ class UniqueIDGenerator(object):
finally:
UniqueId.objects.unlock() # @UndefinedVariable
def releaseOlderThan(self, stamp):
stamp = getSqlDatetime(True)
def releaseOlderThan(self, stamp=None):
stamp = getSqlDatetime(True) if stamp == None else stamp
try:
UniqueId.objects.lock() # @UndefinedVariable
UniqueId.objects.filter(owner=self._owner, stamp__lt=stamp).update(assigned=False, owner='', stamp=stamp) # @UndefinedVariable