Skip to content

Commit 60fd544

Browse files
committed
Fix InterrogationHordeRunnable
1 parent 2cba71a commit 60fd544

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/me/Logicism/JavaHordeBridge/runnables/InterrogationHordeRunnable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ public void run() {
105105
}
106106
interrogatePayload.put("forms", formsArray);
107107

108+
System.out.println(interrogatePayload);
109+
108110
Map<String, String> headers = new HashMap<>();
109111
headers.put("apikey", apiKey);
110112
headers.put("Content-Type", "application/json");
@@ -131,7 +133,7 @@ public void run() {
131133
if (bd != null) {
132134
JSONObject popObject = new JSONObject(BrowserClient.requestToString(bd.getResponse()));
133135
if (bd.getResponseCode() == 200) {
134-
if (!popObject.getJSONArray("forms").isEmpty()) {
136+
if (!popObject.isNull("forms")) {
135137
JSONArray forms = popObject.getJSONArray("forms");
136138

137139
bridge.getLogger().info("Received a job with " + forms.length() + " forms to be processed");

0 commit comments

Comments
 (0)