Merge branch 'master' of http://git.kadet.net/system-praktyk/system-praktyk-api into fix/tytokurwaniepotrafisznicporzadniezrobic
This commit is contained in:
commit
2fdf2f2326
@ -49,9 +49,11 @@ namespace InternshipSystem.Core.Entity.Internship
|
||||
.SetValidator(new Mentor.Validate())
|
||||
.NotNull();
|
||||
RuleFor(x => x.Subjects)
|
||||
.NotEmpty();
|
||||
.NotEmpty()
|
||||
.Must(s => edition.AreSubjectsAvailable(s.Select(su => su.InternshipSubjectId)));
|
||||
RuleFor(x => x.Type)
|
||||
.NotNull();
|
||||
.NotNull()
|
||||
.Must(edition.IsTypeAvailable);
|
||||
RuleFor(x => x.Start)
|
||||
.GreaterThanOrEqualTo(edition.EditionStart)
|
||||
.LessThan(x => x.End)
|
||||
|
Loading…
Reference in New Issue
Block a user