Insert assertion that the doc_id returned from open-ils.search.biblio.record.mods_sli...
authorkenstir <kenstir@gmail.com>
Wed, 2 Dec 2015 14:50:02 +0000 (09:50 -0500)
committerkenstir <kenstir@gmail.com>
Wed, 2 Dec 2015 14:50:02 +0000 (09:50 -0500)
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalog.java

index 3db97dc..ef39423 100644 (file)
@@ -219,6 +219,11 @@ public class SearchCatalog {
         OSRFObject response = (OSRFObject) Utils.doRequestSimple(conn(), SERVICE,
                 METHOD_SLIM_RETRIVE, new Object[] {
                         id });
+        // todo remove this check once I can trust this assumption.
+        // Elsewhere we look up record images based on doc_id.
+        if (response.getInt("doc_id") != id) {
+            throw(new AssertionError(id));
+        }
         return response;
     }