Skip to content

Commit c6d47b4

Browse files
committed
😍 sync: provide API for magic button customization
1 parent 36abfc5 commit c6d47b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sync/models/sync_task.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _compute_active_triggers(self):
103103
r.active_automation_ids = r.with_context(active_test=True).automation_ids
104104
r.active_webhook_ids = r.with_context(active_test=True).webhook_ids
105105

106-
def action_magic_button(self):
106+
def _magic_button(self):
107107
# TODO: This should be refactored, because we use single button per task
108108
if not self.button_ids:
109109
self.button_ids.create(
@@ -113,7 +113,11 @@ def action_magic_button(self):
113113
"sync_task_id": self.id,
114114
}
115115
)
116-
return self.button_ids.start_button()
116+
117+
return self.button_ids
118+
119+
def action_magic_button(self):
120+
return self._magic_button().start_button()
117121

118122
def _get_current_date_formatted(self):
119123
user_lang = self.env.user.lang or "en_US"

0 commit comments

Comments
 (0)