From eddc5333b245decd74564a2617b315da5ddfac70 Mon Sep 17 00:00:00 2001 From: Rizki Sunaryo Date: Sun, 2 Jun 2019 13:53:41 +0700 Subject: [PATCH] fix crash when selecting a child in Child page --- .../smartregister/bidan/activity/BaseRegisterActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java index db0440c..d268cfb 100644 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java +++ b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java @@ -513,8 +513,8 @@ public void onDialogOptionSelection(DialogOption option, Object tag) { CommonPersonObject kiparent = null; try { kiparent = kirep.findByCaseID(childobject.getColumnmaps().get("relational_id")); + detailsRepository.updateDetails(kiparent); } catch (Exception e) {} - detailsRepository.updateDetails(kiparent); JSONObject fieldOverrides = new JSONObject(); @@ -522,6 +522,8 @@ public void onDialogOptionSelection(DialogOption option, Object tag) { fieldOverrides.put("Sub-village", kiparent.getDetails().get("address1")); } catch (JSONException e) { e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); } FieldOverrides fo = new FieldOverrides(fieldOverrides.toString());