disarm-dev / douma-api

DiSARM api (2018 and beyond)
MIT License
2 stars 1 forks source link

Hotfix/383 seasons changes not persisting + getting error #43

Closed mosaic141688 closed 6 years ago

mosaic141688 commented 6 years ago

If the body does not have a config_data field, the body is used instead as config data to avoid trying to get config_id from config_data if it is undefined.

onlyjsmith commented 6 years ago

Why are we getting these different options coming in from the client? Any way we can simplify it on the client?

cc @Nicolaidavies

onlyjsmith commented 6 years ago

Ah - is it the difference between create and update? We're using the same endpoint for both?

mosaic141688 commented 6 years ago

yes both create and update use the POST method

onlyjsmith commented 6 years ago

@mosaic141688 looks like you've taken out the _id from the tests. Are we testing both branches of the if?

TNgidi commented 6 years ago

No netlify link for me to review let me know when to test anyway!

mosaic141688 commented 6 years ago

I have removed the _id from responses seed data because in actual use the responses are inserted without _id from the client

mosaic141688 commented 6 years ago

@TNgidi the PR does not have a netlify link because its on the API repository, I'm not sure if there is an equivalent way we can use to test the API.

onlyjsmith commented 6 years ago

@mosaic141688 that makes sense about the _id thanks.

onlyjsmith commented 6 years ago

@mosaic141688 there's a failing test...

mosaic141688 commented 6 years ago

On 392-location_selection-is-removed-when-adding-seasons I added instance: { slug: 'example_slug' } to mock store to fix the failing tests. They were failing because the seasons component was accessing the instance.slug which was not in store in the test mock

onlyjsmith commented 6 years ago

Think this PR is old - can close once we're sure #44 includes all the changes we want.