Showing
1 changed file
with
1 additions
and
1 deletions
@@ -47,7 +47,7 @@ public class TkEventController extends BaseController { | @@ -47,7 +47,7 @@ public class TkEventController extends BaseController { | ||
47 | throws ThingsboardException { | 47 | throws ThingsboardException { |
48 | checkParameter("tbDeviceId", tbDeviceId); | 48 | checkParameter("tbDeviceId", tbDeviceId); |
49 | 49 | ||
50 | - if (orderBy != null && orderBy.isEmpty()) { | 50 | + if (orderBy == null || orderBy.isEmpty()) { |
51 | orderBy = ModelConstants.EVENT_TIME_COLUMN; | 51 | orderBy = ModelConstants.EVENT_TIME_COLUMN; |
52 | } | 52 | } |
53 | TimePageLink pageLink = createTimePageLink(pageSize, page, null, orderBy, orderType==null?"":orderType.name(), startTime, endTime); | 53 | TimePageLink pageLink = createTimePageLink(pageSize, page, null, orderBy, orderType==null?"":orderType.name(), startTime, endTime); |