feat: set default language on instance (#3594)

This commit is contained in:
Livio Amstutz
2022-05-03 15:58:38 +02:00
committed by GitHub
parent 462fe10dab
commit 79db247801
12 changed files with 83 additions and 35 deletions

View File

@@ -281,6 +281,7 @@ func prepareInstancesQuery() (sq.SelectBuilder, func(*sql.Rows) (*Instances, err
&lang,
&count,
)
instance.DefaultLang = language.Make(lang)
if err != nil {
return nil, err
}
@@ -378,6 +379,7 @@ func prepareInstanceDomainQuery(host string) (sq.SelectBuilder, func(*sql.Rows)
InstanceID: instance.ID,
})
}
instance.DefaultLang = language.Make(lang)
if err := rows.Close(); err != nil {
return nil, errors.ThrowInternal(err, "QUERY-Dfbe2", "Errors.Query.CloseRows")
}