diff --git a/src/main/java/ru/ulstu/conference/controller/ConferenceController.java b/src/main/java/ru/ulstu/conference/controller/ConferenceController.java
index 4c5ea91..d324eb4 100644
--- a/src/main/java/ru/ulstu/conference/controller/ConferenceController.java
+++ b/src/main/java/ru/ulstu/conference/controller/ConferenceController.java
@@ -78,6 +78,12 @@ public class ConferenceController {
@PostMapping(value = "/conference", params = "save")
public String save(@Valid ConferenceDto conferenceDto, Errors errors) throws IOException {
filterEmptyDeadlines(conferenceDto);
+ for (Deadline deadline : conferenceDto.getDeadlines()) {
+ if (deadline.getDate() == null || deadline.getDescription().isEmpty()) {
+ errors.rejectValue("deadlines", "errorCode", "Все поля дедлайна должны быть заполнены");
+ return CONFERENCE_PAGE;
+ }
+ }
if (errors.hasErrors()) {
return CONFERENCE_PAGE;
}
diff --git a/src/main/java/ru/ulstu/timeline/model/EventDto.java b/src/main/java/ru/ulstu/timeline/model/EventDto.java
index 1d2a29a..e92d2cb 100644
--- a/src/main/java/ru/ulstu/timeline/model/EventDto.java
+++ b/src/main/java/ru/ulstu/timeline/model/EventDto.java
@@ -62,9 +62,13 @@ public class EventDto {
this.createDate = event.getCreateDate();
this.updateDate = event.getUpdateDate();
this.description = event.getDescription();
- this.paperDto = new PaperDto(event.getPaper());
this.recipients = convert(event.getRecipients(), UserDto::new);
- this.conferenceDto = new ConferenceDto(event.getConference());
+ if (paperDto != null) {
+ this.paperDto = new PaperDto(event.getPaper());
+ }
+ if (conferenceDto != null) {
+ this.conferenceDto = new ConferenceDto(event.getConference());
+ }
}
public Integer getId() {
diff --git a/src/main/resources/templates/conferences/conference.html b/src/main/resources/templates/conferences/conference.html
index 69c754a..d5906b6 100644
--- a/src/main/resources/templates/conferences/conference.html
+++ b/src/main/resources/templates/conferences/conference.html
@@ -150,10 +150,10 @@
+
Имя статьи
-