Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Mar 15, 2017
2 parents 00aacab + f07ef5e commit 5b3432e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/tale/service/impl/ContentsServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ public void updateArticle(Contents contents) {

activeRecord.update(contents);

String sql = "delete from t_relationships where cid = ?";
activeRecord.execute(sql, cid);
if (!StringKit.equals(contents.getType(), Types.PAGE)) {
String sql = "delete from t_relationships where cid = ?";
activeRecord.execute(sql, cid);
}

metasService.saveMetas(cid, contents.getTags(), Types.TAG);
metasService.saveMetas(cid, contents.getCategories(), Types.CATEGORY);
Expand Down

0 comments on commit 5b3432e

Please sign in to comment.