Revision 57497
Added by Konstantina Galouni over 4 years ago
CommunityController.java | ||
---|---|---|
157 | 157 |
@RequestMapping(value = "/community/update", method = RequestMethod.POST) |
158 | 158 |
public CommunityResponse updateCommunity(@RequestBody Community community) { |
159 | 159 |
Community com = communityDAO.findById(community.getId()); |
160 |
|
|
161 |
Statistics statistics = statisticsDAO.findByPid(com.getPid()); |
|
162 |
statistics.setPid(community.getPid()); |
|
163 |
statisticsDAO.save(statistics); |
|
164 |
|
|
165 |
CommunitySubscribers communitySubscribers = communitySubscribersDAO.findByPid(com.getPid()); |
|
166 |
communitySubscribers.setPid(community.getPid()); |
|
167 |
communitySubscribersDAO.save(communitySubscribers); |
|
168 |
|
|
160 | 169 |
com.setName(community.getName()); |
161 | 170 |
com.setPid(community.getPid()); |
162 | 171 |
// = this.getCommunityByCommunityResponse(communityResponse); |
Also available in: Unified diff
1. bug_fix_db.js: New script to remove leaks (statistics and community subscribers) from db for 2 deleted communities.
2. CommunityController.java: When updating a community, update 'pid' field in statistics and community subscribers related to this community.
3. PageHelpContentController.java: Revert previous commit - in function 'insertPageHelpContent()' always give pagehelpcontent parameter with community pid and replace it with id there.