The vehicle_name choices in MissionFilter (smdb/filters.py) are evaluated once at class definition time (module import). When new vehicle names are added to the database, they do not appear in the filter dropdown until the Django container is restarted.
This was discovered when the 8 new FKt260517 Empress AUV surveys were loaded — vehicle_name = "Empress" was correctly in the DB but "Empress" did not appear in the filter until docker restart smdb-django-1.
Suggested fix: Replace MultipleChoiceFilter with ModelMultipleChoiceFilter (or move choices evaluation into init) so choices are queried from the DB dynamically per request.
The vehicle_name choices in MissionFilter (smdb/filters.py) are evaluated once at class definition time (module import). When new vehicle names are added to the database, they do not appear in the filter dropdown until the Django container is restarted.
This was discovered when the 8 new FKt260517 Empress AUV surveys were loaded — vehicle_name = "Empress" was correctly in the DB but "Empress" did not appear in the filter until docker restart smdb-django-1.
Suggested fix: Replace MultipleChoiceFilter with ModelMultipleChoiceFilter (or move choices evaluation into init) so choices are queried from the DB dynamically per request.