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) {
|
public void onClick(AjaxRequestTarget target) {
|
||||||
WebNotification notification = item.getModelObject();
|
WebNotification notification = item.getModelObject();
|
||||||
notification.setReadByUser(true);
|
notification.setReadByUser(true);
|
||||||
webNotificationDao.save(notification);
|
notification = webNotificationDao.save(notification);
|
||||||
target.addComponent(webMarkupContainer);
|
target.addComponent(webMarkupContainer);
|
||||||
countOfNotifications = numberOfNotificationsModel.getObject();
|
countOfNotifications = numberOfNotificationsModel.getObject();
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ public class NotificationsPanel extends Panel {
|
|||||||
for (WebNotification webnotification : webNotificationDao
|
for (WebNotification webnotification : webNotificationDao
|
||||||
.getWebNotifications(SciProSession.get().getUser())) {
|
.getWebNotifications(SciProSession.get().getUser())) {
|
||||||
webnotification.setReadByUser(true);
|
webnotification.setReadByUser(true);
|
||||||
webNotificationDao.save(webnotification);
|
notification = webNotificationDao.save(webnotification);
|
||||||
}
|
}
|
||||||
countOfNotifications = numberOfNotificationsModel.getObject();
|
countOfNotifications = numberOfNotificationsModel.getObject();
|
||||||
target.addComponent(webMarkupContainer);
|
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.
|
//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.getKeywords().setKeywords(keywords);
|
||||||
employee.getCapabilities().setLanguages(languages);
|
employee.getCapabilities().setLanguages(languages);
|
||||||
supervisorDao.save(employee);
|
employee = supervisorDao.save(employee);
|
||||||
userDao.save(employee.getUser());
|
userDao.save(employee.getUser());
|
||||||
}
|
}
|
||||||
@Transactional
|
@Transactional
|
||||||
public void saveUserProfileData(final User user){
|
public void saveUserProfileData(User user){
|
||||||
if(user == null)
|
if(user == null)
|
||||||
throw new IllegalArgumentException("Null user is not allowed");
|
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);
|
checkPlagiarismEventDao.delete(cpe);
|
||||||
String turnitinId = turnitinComponent.quickSubmitPaper(fd, fd.getName(), uploader.getFirstName(), uploader.getLastName(), seminar.getProject().getTitle(20));
|
String turnitinId = turnitinComponent.quickSubmitPaper(fd, fd.getName(), uploader.getFirstName(), uploader.getLastName(), seminar.getProject().getTitle(20));
|
||||||
seminar.setTurnitinId(turnitinId);
|
seminar.setTurnitinId(turnitinId);
|
||||||
finalSeminarDao.save(seminar);
|
seminar = finalSeminarDao.save(seminar);
|
||||||
this.commitTransaction();
|
this.commitTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user