opensupplyhub / open-apparel-registry

An application for searching, matching, uploading factories.
MIT License
32 stars 13 forks source link

Facility search resulting in "whoops" error page #1959

Closed mariel-oar closed 2 years ago

mariel-oar commented 2 years ago

This is a claimed facility that is in the OAR. Uploaded in March 2022.

When I try searching this facility: /facilities/VN202108625A1KW?q=VN202108625A1KW. I get a Whoops something went wrong error. I was trying to see if claimed facility data was displaying and this is a claimed facility in the OAR. It happens when I try to search it by name, too: /facilities/VN202108625A1KW?q=protrade

Based on the contribution date, it looks liek this facility should have been migrated from OAR. Is there a reason it is erroring in OS Hub? It works in OAR.

Proposed Fix

jwalgran commented 2 years ago

In an example from staging (US2022117EBHAQ2) there is a null value from sectors added to a claim

Screen Shot 2022-07-07 at 1 40 05 PM

A null values causes an exception here

Screen Shot 2022-07-07 at 1 43 48 PM
jwalgran commented 2 years ago

A fix for this is deployed to OS Hub staging