Update vessel_fn to handle empty vessel name from signalk in api.metadata

This commit is contained in:
xbgmsharp
2023-10-25 09:28:10 +02:00
parent 3fed9e0b6a
commit 53daaa9947

View File

@@ -96,7 +96,7 @@ AS $vessel$
BEGIN BEGIN
SELECT SELECT
jsonb_build_object( jsonb_build_object(
'name', m.name, 'name', coalesce(m.name, null),
'mmsi', coalesce(m.mmsi, null), 'mmsi', coalesce(m.mmsi, null),
'created_at', v.created_at::timestamp(0), 'created_at', v.created_at::timestamp(0),
'first_contact', coalesce(m.created_at::timestamp(0), null), 'first_contact', coalesce(m.created_at::timestamp(0), null),