[IMP] runbot_merge: non-empty fallback on fast-forward failure

Up till now if an FF failed with an exception having neither cause nor
context the cancel reason would be an empty string.

Fallback on stringifying the exception itself as a last resort.
This commit is contained in:
Xavier Morel 2020-03-12 13:45:21 +01:00
parent ddf3f5013e
commit 736e618110

View File

@ -1687,7 +1687,7 @@ class Stagings(models.Model):
)
self.write({
'state': 'ff_failed',
'reason': str(e.__cause__ or e.__context__ or '')
'reason': str(e.__cause__ or e.__context__ or e)
})
else:
prs = self.mapped('batch_ids.prs')