whyceewhite / CarLess

Logging commuting trips completed using transit or pedestrian modes of transportation.
0 stars 0 forks source link

Trip list always displays random trip #8

Closed whyceewhite closed 9 years ago

whyceewhite commented 9 years ago

The list of trips will display the saved list of trips. However, a random trip appears in the list as well.

Upon investigation, the random trip is the Trip instance for the Manual Log entry. If you go to that page and modify the values without saving and then switch back to the trips list page then you will notice that the random trip's values match.

This is likely the result of using the same managed context. Find out how to only get persisted values from core data and implement the fix.

whyceewhite commented 9 years ago

When establishing the NSFetchRequest object, set the includesPendingChanges to false to exclude unsaved objects.