mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
Merge pull request #4895 from rainzm/bugfix/notify_template_fetch
fix(notify): Update template
This commit is contained in:
@@ -468,7 +468,7 @@ func (self *NotifyModelDispatcher) UpdateTemplate(ctx context.Context, ctype str
|
||||
|
||||
q := models.TemplateManager.Query().Equals("contact_type", ctype).In("topic", topics.List())
|
||||
templateModels := make([]models.STemplate, 0, 1)
|
||||
err := db.FetchModelObjects(models.ContactManager, q, &templateModels)
|
||||
err := db.FetchModelObjects(models.TemplateManager, q, &templateModels)
|
||||
if err != nil {
|
||||
log.Errorf("db.FetchModelObjects sql: %s", q.String())
|
||||
return errors.Wrap(err, "db.FetchModelObjects")
|
||||
|
||||
@@ -66,7 +66,7 @@ type STemplate struct {
|
||||
|
||||
// title | content | remote
|
||||
TemplateType string `width:"10" nullable:"false" create:"required" update:"user" list:"user"`
|
||||
Content string `length:"text" nullable:"false" create:"required" get:"user" list:"user"`
|
||||
Content string `length:"text" nullable:"false" create:"required" get:"user" list:"user" update:"user"`
|
||||
}
|
||||
|
||||
func (tm *STemplateManager) GetEmailUrl() string {
|
||||
|
||||
Reference in New Issue
Block a user