UCF / Search-Service-Django

A django based REST API for accessing search data and related data management tools.
0 stars 0 forks source link

Lookup Bug #379

Closed jmbarne3 closed 1 year ago

jmbarne3 commented 1 year ago

In our recently added subarea_of_interest field, CIPs that have single digits for their subarea, i.e. 02, 03, etc., were not being returned when queried. The string format we were using wasn't taking into account the fact that those numbers need to be zero padded. So for example, the Accounting (BSBA) program has a CIP of 52.0301. When the string was formatted, it was looking up a code of 52.3 instead of 52.03. I've corrected this by casting the subarea to a string, and then calling the zfill (zero fill) function and specifying it should have a length of 2 digits.

Changes can be reviewed in DEV by looking at program ID 2.

ghost commented 1 year ago

hm, interesting. good catch!