fixed some saves

This commit is contained in:
Fredrik Friis 2012-03-01 12:01:26 +09:00
parent 30d3373256
commit c96875dd0b
3 changed files with 3 additions and 3 deletions

@ -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) {