Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation error for invalid spp code on a fish ticket #2412

Open
neilriley-NOAA opened this issue Jul 27, 2021 · 2 comments
Open

validation error for invalid spp code on a fish ticket #2412

neilriley-NOAA opened this issue Jul 27, 2021 · 2 comments
Assignees
Labels
api Prj: EM Project: Electronic Monitoring

Comments

@neilriley-NOAA
Copy link

trying to upload test data for a real fish ticket in the database and the error below kicked it back upon upload. The test data is included below. Wondering if we need to just add USRK to our list?

VALIDATION ERRORS:
fish ticket errors: {"PACFIN_SPECIES_CODE":["Pacfin species code USRK which maps to fish ticket 206685E is invalid"]}


{
"source": "logbook",
"tripNum": 100329,
"logbookPageNumber": 1234,
"fishery": "Electronic Monitoring EFP",
"year": 2021,
"provider": "NOAA",
"vesselName": "NOAA Lady Jane",
"vesselNumber": "673789",
"permitNumber": "GF0068",
"crewSize": "4",
"isEFPTrip": false,
"isObserved": false,
"isSigned": true,
"skipperName": "Joe Skipper",
"departureDateTime": "2021-07-18T04:00:00-08:00",
"departureState": "CA",
"departurePortCode": "MRO",
"returnDateTime": "2021-07-19T19:00:00-08:00",
"returnState": "CA",
"returnPortCode": "MRO",
"buyers": [
"Bornstein's Seafoods Morro Bay"
],
"fishTickets": [{
"fishTicketNumber": "206685E",
"fishTicketDate": "2021-07-20T00:00:00"
}],
"comment": "first load",
"hauls": [
{
"haulNum": 1,
"gear": "fish pot",
"gearPerSet": "72",
"gearLost": "0",
"avgHooksPerSeg": "72",
"startDateTime": "2021-07-14T04:40:00-08:00",
"startDepth": 280,
"startLatitude": 47.681706,
"startLongitude": -122.425239,
"endDateTime": "2021-07-18T18:19:00-08:00",
"endDepth": 260,
"endLatitude": 47.681706,
"endLongitude": -122.425239,
"netType": "",
"isCodendLost": false,
"codendCapacity": "",
"comments": "this is a haul comment",
"avgDepth": 255,
"targetStrategy": "SABL",
"catch": [
{
"disposition": "Retained",
"speciesCode": "SABL",
"speciesWeight": "500",
"speciesLength": "",
"speciesCount": "25",
"calcWeightType": "Estimated Weight",
"comments": "this is a catch comment"
},
{
"disposition": "Discarded",
"speciesCode": "SABL",
"speciesLength": "",
"speciesCount": 1,
"calcWeightType": "calculated Weight",
"comments": ""
}
]
}
]
}

@neilriley-NOAA neilriley-NOAA added api Prj: EM Project: Electronic Monitoring labels Jul 27, 2021
@sethgerou-noaa
Copy link
Contributor

I determined this is happening because there's no catch-grouping or taxonomy-alias doc with the Pacfin code 'USRK'.
I'm not sure how often this will come up. I'm wondering whether it makes more sense to add catch-groupings with corresponding Pacfin codes as they come up, or to just disable the validation.

@neilriley-NOAA
Copy link
Author

I suspect this could happen quite. There could be a lot of different codes that could show up on the fish ticket that may never be used on the logbook. I am leaning toward disabling the validation. Disabling that validation shouldn't affect the calculations...I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Prj: EM Project: Electronic Monitoring
Projects
None yet
Development

No branches or pull requests

2 participants