django-geo-spaas
django-geo-spaas copied to clipboard
Rework the string representation of some vocabulary models
Generally, the string representation of vocabulary instances relies on their short name, but some don't have one. For example:
OrderedDict([('Category', 'Earth Remote Sensing Instruments'),
('Class', 'Active Remote Sensing'),
('Type', 'Altimeters'),
('Subtype', ''),
('Short_Name', ''),
('Long_Name', '')])
In the case of instruments and platforms, it can be a problem because then the source shows as "/" in the web viewer. We can maybe have something that tries the fields one by one, by decreasing order of priority and stops when it finds a non-empty field.