fixed some saves
This commit is contained in:
parent
bb784e61d9
commit
30d115399f
src/main/java/se/su/dsv/scipro
project/panels
user/facade
workerthreads
@ -97,7 +97,7 @@ public class NotificationsPanel extends Panel {
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
WebNotification notification = item.getModelObject();
|
||||
notification.setReadByUser(true);
|
||||
webNotificationDao.save(notification);
|
||||
notification = webNotificationDao.save(notification);
|
||||
target.addComponent(webMarkupContainer);
|
||||
countOfNotifications = numberOfNotificationsModel.getObject();
|
||||
}
|
||||
@ -115,7 +115,7 @@ public class NotificationsPanel extends Panel {
|
||||
for (WebNotification webnotification : webNotificationDao
|
||||
.getWebNotifications(SciProSession.get().getUser())) {
|
||||
webnotification.setReadByUser(true);
|
||||
webNotificationDao.save(webnotification);
|
||||
notification = webNotificationDao.save(webnotification);
|
||||
}
|
||||
countOfNotifications = numberOfNotificationsModel.getObject();
|
||||
target.addComponent(webMarkupContainer);
|
||||
|
@ -41,13 +41,13 @@ public class UserFacade {
|
||||
//the line below is why the unit disappears when saving a supervisor profile- the unit is never specified so it saves null over the existing value.
|
||||
// employee.getKeywords().setKeywords(keywords);
|
||||
employee.getCapabilities().setLanguages(languages);
|
||||
supervisorDao.save(employee);
|
||||
employee = supervisorDao.save(employee);
|
||||
userDao.save(employee.getUser());
|
||||
}
|
||||
@Transactional
|
||||
public void saveUserProfileData(final User user){
|
||||
public void saveUserProfileData(User user){
|
||||
if(user == null)
|
||||
throw new IllegalArgumentException("Null user is not allowed");
|
||||
userDao.save(user);
|
||||
user = userDao.save(user);
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class CheckPlagiarismEventWorker extends AbstractWorker {
|
||||
checkPlagiarismEventDao.delete(cpe);
|
||||
String turnitinId = turnitinComponent.quickSubmitPaper(fd, fd.getName(), uploader.getFirstName(), uploader.getLastName(), seminar.getProject().getTitle(20));
|
||||
seminar.setTurnitinId(turnitinId);
|
||||
finalSeminarDao.save(seminar);
|
||||
seminar = finalSeminarDao.save(seminar);
|
||||
this.commitTransaction();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user