Skip to content

Commit

Permalink
SAK-43207 - Sign-up tool discards original events on Import - Merge (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespm committed Mar 1, 2020
1 parent c56b316 commit f5c12b4
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ public String[] myToolIds() {
@Override
//this method is for replace data
public Map<String, String> transferCopyEntities(String fromContext, String toContext, List<String> ids, List<String> transferOptions, boolean cleanup) {
// TODO Auto-generated method stub
String currentUserId = getSakaiFacade().getCurrentUserId();
List<SignupMeeting> oldMeetings = getSignupMeetingService().getAllSignupMeetings(toContext, currentUserId);

//removes meetings before adding new ones
try {
getSignupMeetingService().removeMeetings(oldMeetings);
} catch (Exception e1) {
log.warn("remove oldmeeting error:" + e1.getMessage());
if (cleanup) {
String currentUserId = getSakaiFacade().getCurrentUserId();
List<SignupMeeting> oldMeetings = getSignupMeetingService().getAllSignupMeetings(toContext, currentUserId);
//removes meetings before adding new ones
try {
getSignupMeetingService().removeMeetings(oldMeetings);
} catch (Exception e1) {
log.warn("remove oldmeeting error:" + e1.getMessage());
}
}
return transferCopyEntities(fromContext, toContext, ids, transferOptions);
}
Expand Down

0 comments on commit f5c12b4

Please sign in to comment.