gem/oq-hazardlib — pull request #123 by micheles (2013-05-29 11:57:09+00:00)
Title: Add an .id attribute to Site objects

This is a companion to https://github.com/gem/oq-engine/pull/1192 and it is refers to https://bugs.launchpad.net/oq-engine/+bug/1184603.

Why it is needed? The scenario calculator performs a distribution per site. In order to store the GMVs for a given site, it is necessary to know the database id of that site. However the
calculator gets a hazardlib Site object that contains no id. This pull request adds an id attribute which is filled by the engine with the right id of the corresponding db record.
This is perhaps suboptimal, but it does the job with a minimal change to the current logic of the engine.