I think it would be clearer if self.inherit_id left the value of report[id] alone::
tmp_id = 'OOPS-%s' % md5hash
if not self.inherit or report.get(id) is None:
report[id] = tmp_id
"return original_id or report['id']" looks like it's meant to return the canonical oops-id, but when original_id is non-None, won't it be the same as report['id']?
I think it would be clearer if self.inherit_id left the value of report[id] alone::
tmp_id = 'OOPS-%s' % md5hash
if not self.inherit or report.get(id) is None:
report[id] = tmp_id
"return original_id or report['id']" looks like it's meant to return the canonical oops-id, but when original_id is non-None, won't it be the same as report['id']?