geosolutions-it / smb-portal

SaveMyByke portal
https://waffle.io/geosolutions-it/smb-portal
1 stars 3 forks source link

fix segment serializers for invalid tracks #169

Closed ricardogsilva closed 6 years ago

ricardogsilva commented 6 years ago

Invalid tracks do not get the emissions, costs or health calculations done. As such the corresponding models are not created. This was causing errors when trying to access the detail view of an invalid track.

This PR fixes that error by guarding the emissions, costs, and health representations with appropriate try..except blocks