fix npe
This commit is contained in:
parent
330ffc4df1
commit
b4b7b9087e
@ -232,10 +232,8 @@ public class GrantService extends BaseService {
|
||||
|
||||
private boolean checkSameDeadline(GrantDto grantDto, Integer id) {
|
||||
Date date = grantDto.getDeadlines().get(0).getDate(); //дата с сайта киас
|
||||
if (deadlineService.findByGrantIdAndDate(id, date).compareTo(date) == 0) { //если есть такая строка с датой
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
Date foundGrantDate = deadlineService.findByGrantIdAndDate(id, date);
|
||||
return foundGrantDate != null && foundGrantDate.compareTo(date) == 0;
|
||||
}
|
||||
|
||||
public List<User> getGrantAuthors(GrantDto grantDto) {
|
||||
|
Loading…
Reference in New Issue
Block a user