bcgov / invasivesBC-mussels-iOS

Apache License 2.0
0 stars 4 forks source link

Toggling ON Commercial / Unknown / Stored doesn't delete Waterbodies #289

Closed davidclaveau closed 5 months ago

davidclaveau commented 5 months ago

Describe the Bug Toggling ON any of the Commercial Manufacturer / New Boat, Unknown Waterbody, or Previously/Being Stored toggles under Journey Details doesn't delete the waterbodies from the model. Going out and into the inspection would show the waterbodies again.

Expected Behaviour Toggle any of the buttons to ON in Journey Details should delete all waterbodies

Actual Behaviour Leaving the Inspection and returning will show the waterbodies are all still attached to the Inspection

Implications Incorrect data with waterbodies being submitted that shouldn't be

davidclaveau commented 4 months ago

There was already some functionality to remove the waterbodies in the code, but it wasn't actually being called anywhere. Added a call to the appropriate function so the waterbodies are deleted from Realm when the user toggles any of the city buttons.