diff --git a/src/main/java/com/metaweb/gridworks/model/ColumnModel.java b/src/main/java/com/metaweb/gridworks/model/ColumnModel.java index d8280be89..36aa64e3e 100644 --- a/src/main/java/com/metaweb/gridworks/model/ColumnModel.java +++ b/src/main/java/com/metaweb/gridworks/model/ColumnModel.java @@ -100,8 +100,11 @@ public class ColumnModel implements Jsonizable { } writer.endArray(); - writer.key("keyCellIndex"); writer.value(getKeyColumnIndex()); - writer.key("keyColumnName"); writer.value(columns.get(_keyColumnIndex).getName()); + if (columns.size() > 0) { + writer.key("keyCellIndex"); writer.value(getKeyColumnIndex()); + writer.key("keyColumnName"); writer.value(columns.get(_keyColumnIndex).getName()); + } + writer.key("columnGroups"); writer.array(); for (ColumnGroup g : _rootColumnGroups) {