|
@@ -208,7 +208,11 @@ public class LongPicText extends Controller {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
if (rows.isNotEmpty()) {
|
|
if (rows.isNotEmpty()) {
|
|
|
jsonObject = rows.get(0).getJSONObject("sharepagecontrol");
|
|
jsonObject = rows.get(0).getJSONObject("sharepagecontrol");
|
|
|
- jsonArray = jsonObject.getJSONArray("pics");
|
|
|
|
|
|
|
+ if (jsonObject.containsKey("pics")) {
|
|
|
|
|
+ jsonArray = jsonObject.getJSONArray("pics");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ jsonArray = new JSONArray();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
ArrayList<Long> ids = new ArrayList<>();
|
|
ArrayList<Long> ids = new ArrayList<>();
|
|
@@ -239,7 +243,11 @@ public class LongPicText extends Controller {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
if (rows.isNotEmpty()) {
|
|
if (rows.isNotEmpty()) {
|
|
|
jsonObject = rows.get(0).getJSONObject("sharepagecontrol");
|
|
jsonObject = rows.get(0).getJSONObject("sharepagecontrol");
|
|
|
- jsonArray = jsonObject.getJSONArray("pics");
|
|
|
|
|
|
|
+ if (jsonObject.containsKey("pics")) {
|
|
|
|
|
+ jsonArray = jsonObject.getJSONArray("pics");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ jsonArray = new JSONArray();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
JSONArray newjsonArray = getTempJSONArray(jsonArray, String.valueOf(attachmentid));
|
|
JSONArray newjsonArray = getTempJSONArray(jsonArray, String.valueOf(attachmentid));
|
|
|
|
|
|
|
@@ -276,7 +284,11 @@ public class LongPicText extends Controller {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
if (rows.isNotEmpty()) {
|
|
if (rows.isNotEmpty()) {
|
|
|
jsonObject = rows.get(0).getJSONObject("sharepagecontrol");
|
|
jsonObject = rows.get(0).getJSONObject("sharepagecontrol");
|
|
|
- jsonArray = jsonObject.getJSONArray("pics");
|
|
|
|
|
|
|
+ if (jsonObject.containsKey("pics")) {
|
|
|
|
|
+ jsonArray = jsonObject.getJSONArray("pics");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ jsonArray = new JSONArray();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
jsonObject.put("pics", getTempJSONArray(jsonArray, String.valueOf(attachmentid)));
|
|
jsonObject.put("pics", getTempJSONArray(jsonArray, String.valueOf(attachmentid)));
|
|
|
|
|
|