db/models:
db/models:

Fixed the logic in Output.hazard_metadata to handle more cases.

I'm still not sure if it covers all cases (haz output or haz calc,
loss curve or loss_map, etc.), but at least this reduces crashes during
XML serialization due to missing metadata.


Former-commit-id: 629fcfd8eca687b86bba18075c7af03053f42a57 [formerly 629fcfd8eca687b86bba18075c7af03053f42a57 [formerly 4952a595e5bb3e0ebd6fd72830c7a6fd0cb2bf02]]
Former-commit-id: cc9673beb4d336dc052f0636a4103a23800aa854
Former-commit-id: d3770f145485044927fb62f936074c390aeeaf9c
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine