amamolo9986 / The-Porsche-Project

MIT License
0 stars 0 forks source link

Bug in /{modelCategory} endpoint #45

Open amamolo9986 opened 3 months ago

amamolo9986 commented 3 months ago

Found a bug where, when a series category is not a unique value, I get an exception. for example, a 911 Carrerra is the category name for multiple series, so when we try to click into the seriesCategory endpoint, it doesn't know where to go because there are multiple 911 Carrerras for it to choose from, so I get this exception:

query did not return a unique result: 3

amamolo9986 commented 3 months ago

I imagine there needs to be a conditional in the findBySeries method in the MasterService class that filters by series category based off of current seriesName and not all seriesNames. There are a few categories that contain the same string so they are not unique to that table column, but within a given series, all categories ARE unique. so this should solve it.

amamolo9986 commented 3 months ago

I no longer get an exception, but all models containing the same category, no matter the series name, is displayed on one screen.