Fixed removed code
Change-Id: I7962979ff99584c44c153a945d81effedf9fff53 Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
parent
b0bf0d7bee
commit
f54a626aed
|
@ -454,6 +454,32 @@ final class PresentationService
|
|||
|
||||
$presentation->setType($event_type);
|
||||
$presentation->setCategory($track);
|
||||
// tags
|
||||
if (isset($data['tags'])) {
|
||||
$presentation->clearTags();
|
||||
|
||||
if (count($data['tags']) > 0) {
|
||||
if(!$presentation->isCompleted())
|
||||
$presentation->setProgress(Presentation::PHASE_TAGS);
|
||||
}
|
||||
|
||||
foreach ($data['tags'] as $tag_value) {
|
||||
$tag = $track->getAllowedTagByVal($tag_value);
|
||||
if (is_null($tag)) {
|
||||
throw new ValidationException(
|
||||
trans(
|
||||
'validation_errors.PresentationService.saveOrUpdatePresentation.TagNotAllowed',
|
||||
[
|
||||
'tag' => $tag_value,
|
||||
'track_id' => $track->getId()
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
$presentation->addTag($tag);
|
||||
}
|
||||
}
|
||||
|
||||
return PresentationFactory::populate($presentation, $data);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue