diff --git a/frontend/my/src/Campaign.js b/frontend/my/src/Campaign.js
index ef26125..12bc0ad 100644
--- a/frontend/my/src/Campaign.js
+++ b/frontend/my/src/Campaign.js
@@ -308,7 +308,10 @@ class TheFormDef extends React.PureComponent {
})()}
- {getFieldDecorator("lists", { initialValue: subLists, rules: [{ required: true }] })(
+ {getFieldDecorator("lists", {
+ initialValue: subLists.length > 0 ? subLists : (this.props.data[cs.ModelLists].length === 1 ? [this.props.data[cs.ModelLists][0].id] : undefined),
+ rules: [{ required: true }]
+ })(
- {getFieldDecorator("template_id", { initialValue: record.template_id, rules: [{ required: true }] })(
+ {getFieldDecorator("template_id", {
+ initialValue: record.template_id ? record.template_id : (this.props.data[cs.ModelTemplates].length === 1 ? this.props.data[cs.ModelTemplates][0].id : undefined),
+ rules: [{ required: true }]
+ })(