rapidftr / tracker

The Issue Tracker for RapidFTR
2 stars 3 forks source link

Sync single enquiry failing #195

Closed tomclement closed 10 years ago

tomclement commented 10 years ago

Syncing a single enquiry is now failing.

Steps to Reproduce

Expected Result That enquiry should be synced successfully

Actual Result The sync operation fails. The server logs indicate the following error: RuntimeError (Expecting an array or keyed hash for property Enquiry#ids_marked_as_not_matching)

tomclement commented 10 years ago

[Update] Sync single enquiry is now failing for only updates (and not create).

Steps to Reproduce

Expected Result That enquiry should be synced successfully

Actual Result The sync operation fails. The server logs indicate the following errors: java.io.SyncFailedException Action Controller: Exception caught

ctumwebaze commented 10 years ago

The server api expected the criteria used for finding potential matches to be present. If the criteria is empty, the server would reject the record with an error "Unprocessable entity". When the server criteria functionality was changed from storing the criteria on the actual entity to composing it on the fly and finding potential matches, the api check was not removed.

Also due to the refactoring on sync functionality on the mobile application, by introducing a uniform HttpDao object for all the entities, during the update process, the id of the entity wouldn't be sent along and the server wouldn't know which entity to update.