django-geo-spaas icon indicating copy to clipboard operation
django-geo-spaas copied to clipboard

Rework the string representation of some vocabulary models

Open aperrin66 opened this issue 3 years ago • 0 comments

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.

aperrin66 avatar Aug 05 '21 08:08 aperrin66