generated from VLADIMIR/template
add games
This commit is contained in:
@@ -174,6 +174,15 @@ func (s *ScenarioService) updateStory(ctx context.Context, id int, story *storyt
|
||||
return errors.New("Такой код точки уже существует")
|
||||
}
|
||||
|
||||
cleanPlaces := make([]*storytelling.Place, 0, len(story.Places))
|
||||
for _, place := range story.Places {
|
||||
if place.Code == "" {
|
||||
continue
|
||||
}
|
||||
cleanPlaces = append(cleanPlaces, place)
|
||||
}
|
||||
story.Places = cleanPlaces
|
||||
|
||||
storyString, err := convertStory(story)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user