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
|
@Override
|
||||||
public void onSubmit() {
|
public void onSubmit() {
|
||||||
settings.setProjectPartnerDaysToLive(amountOfDays);
|
settings.setProjectPartnerDaysToLive(amountOfDays);
|
||||||
generalSystemSettingsDao.save(settings);
|
settings = generalSystemSettingsDao.save(settings);
|
||||||
info("OK");
|
info("OK");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,7 @@ public class AdminExemptionCreatePanel extends Panel {
|
|||||||
exemption.setGrantedBy(SciProSession.get().getUser());
|
exemption.setGrantedBy(SciProSession.get().getUser());
|
||||||
exemption.setAuthor(authorDao.getOrCreate(studentSelector.getModelObject().getUser()));
|
exemption.setAuthor(authorDao.getOrCreate(studentSelector.getModelObject().getUser()));
|
||||||
try {
|
try {
|
||||||
exemptionDao.save(exemption);
|
exemption = exemptionDao.save(exemption);
|
||||||
info("Exemption created.");
|
info("Exemption created.");
|
||||||
} catch (DataIntegrityViolationException e) {
|
} catch (DataIntegrityViolationException e) {
|
||||||
error("Only one exemption per author and project class allowed.");
|
error("Only one exemption per author and project class allowed.");
|
||||||
|
@ -63,7 +63,7 @@ public class AutomaticMatchPanel extends Panel {
|
|||||||
for (Match match : result.matches) {
|
for (Match match : result.matches) {
|
||||||
match.setCreatedBy(SciProSession.get().getUser());
|
match.setCreatedBy(SciProSession.get().getUser());
|
||||||
match.setStatus(Match.Status.PUBLISHED);
|
match.setStatus(Match.Status.PUBLISHED);
|
||||||
matchDao.save(match);
|
match = matchDao.save(match);
|
||||||
}
|
}
|
||||||
info("Saved " + result.matches.size() + " matches");
|
info("Saved " + result.matches.size() + " matches");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user