Browse Source

Merge branch 'master' of https://devel.mephi.ru/dyokunev/go-asu-models

Dmitry Yu Okunev 5 years ago
parent
commit
6816ea32f8
1 changed files with 8 additions and 0 deletions
  1. 8 0
      formular.go

+ 8 - 0
formular.go

@@ -158,6 +158,14 @@ func (f Formular) IsActive() bool {
 
 type Formulars []Formular
 
+func (formulars Formulars) PrepareIsActive() Formulars {
+	for idx, _ := range formulars {
+		formulars[idx].PrepareIsActive()
+	}
+
+	return formulars
+}
+
 func (formulars Formulars) ToMap() map[int]*Formular {
 	formularMap := map[int]*Formular{}