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

Forgot removing comments & try-catch block :)

This commit is contained in:
Adolfo Gómez García 2016-05-20 09:38:46 +02:00
parent 2d14884454
commit 14cddbb210

View File

@ -195,13 +195,17 @@ class DeployedService(UUIDModel, TaggingMixin):
def toBeReplaced(self):
# return datetime.now()
activePub = self.activePublication()
# if activePub is None or activePub.revision == self.current_pub_revision - 1:
# return None
if activePub is None or activePub.revision == self.current_pub_revision - 1:
return None
# Return the date
try:
ret = self.recoverValue('toBeReplacedIn')
if ret is not None:
return pickle.loads(ret)
except Exception:
logger.exception('Recovering publication death line')
return None