Fix exception when setting non-existing change outdated
Change-Id: Id6e51e16c36cfda50e990997b7a97590434e2c5f
This commit is contained in:
parent
c20ec64ad8
commit
fcf512ba85
|
@ -575,7 +575,8 @@ class SyncChangeTask(Task):
|
|||
self.log.error("Marking change %s outdated" % (self.change_id,))
|
||||
with sync.app.db.getSession() as session:
|
||||
change = session.getChangeByID(self.change_id)
|
||||
change.outdated = True
|
||||
if change:
|
||||
change.outdated = True
|
||||
except Exception:
|
||||
self.log.exception("Error while marking change %s as outdated" % (self.change_id,))
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue