Skip to content

Commit

Permalink
Merge pull request #2512 from SCADA-LTS/fix/#2511_Fixed_system_events…
Browse files Browse the repository at this point in the history
…_handler

#2511 Fixed system events handler
  • Loading branch information
Limraj committed Apr 17, 2023
2 parents e252021 + 35ea3a9 commit 17d1078
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/scada_lts/dao/event/EventDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ public EventType getEventHandlerType(int handlerId) {
}

public List<EventHandlerVO> getEventHandlers(int typeId, int ref1, int ref2) {
if(ref2 > 0)
if(ref2 > 0 && (typeId == EventType.EventSources.DATA_POINT || typeId == EventType.EventSources.DATA_SOURCE))
return (List<EventHandlerVO>) DAO.getInstance().getJdbcTemp().query(EVENT_HANDLER_SELECT+" where "+ EVENT_HANDLER_FILTER_REF2, new Object[] {typeId, ref1, ref2}, new EventHandlerRowMapper());
return (List<EventHandlerVO>) DAO.getInstance().getJdbcTemp().query(EVENT_HANDLER_SELECT+" where "+ EVENT_HANDLER_FILTER_N, new Object[] {typeId, ref1}, new EventHandlerRowMapper());
}
Expand Down

0 comments on commit 17d1078

Please sign in to comment.