Skip to content

Commit

Permalink
SAK-31012 Delete existing acknowledgements before adding another
Browse files Browse the repository at this point in the history
  • Loading branch information
marktriggs committed Apr 26, 2016
1 parent 5320b1d commit 43fcac5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public void acknowledge(final String uuid, final String userEid, final Acknowled
new DBAction<Void>() {
@Override
public Void call(DBConnection db) throws SQLException {
db.run("DELETE FROM " + tableName + " where uuid = ? AND user_eid = ?")
.param(uuid)
.param(userEid.toLowerCase())
.executeUpdate();

db.run("INSERT INTO " + tableName + " (uuid, user_eid, state, dismiss_time) values (?, ?, ?, ?)")
.param(uuid)
.param(userEid.toLowerCase())
Expand Down

0 comments on commit 43fcac5

Please sign in to comment.