nwfsc-fram / boatnet

At-Sea Field Data Collection Software Components for Scientific Surveys and Observers
8 stars 5 forks source link

Elogbook not displaying catch weight and count #2371

Closed neilriley-NOAA closed 3 years ago

neilriley-NOAA commented 3 years ago

@sethgerou-noaa any logbook weights and counts submitted via the api are not displayed in the app.

image

sethgerou-noaa commented 3 years ago

what trip # is this?

neilriley-NOAA commented 3 years ago

100309

sethgerou-noaa commented 3 years ago

Ah, these need to be submitted as 'speciesWeight' and 'speciesCount'.

Not sure how we want to handle validation - these fields are not required currently, as there are cases where either one of the values is not required / can't be supplied. Also, It could get tricky to check for incorrect attribute names nested inside arrays.

neilriley-NOAA commented 3 years ago

so the example json in the EM API Portal is not correct. Can you update the example json so others don't run into this issue. since these aren't required, I am not sure how to validate. can we start with rejecting data that has a field name that doesn't match the api?

sethgerou-noaa commented 3 years ago

I've updated the examples.

I'll need to think/research a bit on how to reject field names that don't match the api - unfortunately most validation seems to be meant to validate the values, not the fields.

neilriley-NOAA commented 3 years ago

Looks good. Thanks.