fixed some saves
This commit is contained in:
parent
30d3373256
commit
c96875dd0b
src/main/java/se/su/dsv/scipro/admin/pages
@ -46,7 +46,7 @@ public class AdminProjectPartnerPage extends AbstractAdminPage {
|
||||
@Override
|
||||
public void onSubmit() {
|
||||
settings.setProjectPartnerDaysToLive(amountOfDays);
|
||||
generalSystemSettingsDao.save(settings);
|
||||
settings = generalSystemSettingsDao.save(settings);
|
||||
info("OK");
|
||||
}
|
||||
});
|
||||
|
@ -68,7 +68,7 @@ public class AdminExemptionCreatePanel extends Panel {
|
||||
exemption.setGrantedBy(SciProSession.get().getUser());
|
||||
exemption.setAuthor(authorDao.getOrCreate(studentSelector.getModelObject().getUser()));
|
||||
try {
|
||||
exemptionDao.save(exemption);
|
||||
exemption = exemptionDao.save(exemption);
|
||||
info("Exemption created.");
|
||||
} catch (DataIntegrityViolationException e) {
|
||||
error("Only one exemption per author and project class allowed.");
|
||||
|
@ -63,7 +63,7 @@ public class AutomaticMatchPanel extends Panel {
|
||||
for (Match match : result.matches) {
|
||||
match.setCreatedBy(SciProSession.get().getUser());
|
||||
match.setStatus(Match.Status.PUBLISHED);
|
||||
matchDao.save(match);
|
||||
match = matchDao.save(match);
|
||||
}
|
||||
info("Saved " + result.matches.size() + " matches");
|
||||
} catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user