socialappslab / denguechat-ionic

Other
1 stars 0 forks source link

Race condition #74

Closed dman7 closed 7 years ago

dman7 commented 7 years ago

Consider the following scenario:

  1. User is offline,
  2. User creates a new location
  3. User creates a new visit of that location
  4. User changes the address of that location
  5. User reconnects
  6. Sync will forever fail because visit that is being pushed has stored the location's address before it was changed. The error will be "We couldn't find an associated location!"

The solution is to fetch the Location object right before pushing to the cloud!