Exemple #1
0
func (form *TopicAdminForm) SetToTopic(topic *models.Topic) {
	utils.SetFormValues(form, topic, "Id")
	if topic.Category != nil {
		topic.Category.Id = form.Category
	} else {
		topic.Category = &models.Category{Id: form.Category}
	}
}