def post_add(self, obj): # Schedule a test mail if the user requested for it. if self._extra_data['test_email']: recipients = self._extra_data['test_email_recipients'] args = (self.schedule_type, obj.id) kwargs = dict(recipients=recipients) schedule_email_report.apply_async(args=args, kwargs=kwargs) # Notify the user that schedule changes will be activate only in the # next hour if obj.active: flash('Schedule changes will get applied in one hour', 'warning')
def post_add(self, item): # Schedule a test mail if the user requested for it. if self._extra_data["test_email"]: recipients = self._extra_data["test_email_recipients"] or item.recipients args = (self.schedule_type, item.id) kwargs = dict(recipients=recipients) schedule_email_report.apply_async(args=args, kwargs=kwargs) # Notify the user that schedule changes will be activate only in the # next hour if item.active: flash("Schedule changes will get applied in one hour", "warning")
def post_add(self, obj): # Schedule a test mail if the user requested for it. if self._extra_data['test_email']: recipients = self._extra_data['test_email_recipients'] args = (self.schedule_type, obj.id) kwargs = dict(recipients=recipients) schedule_email_report.apply_async(args=args, kwargs=kwargs) # Notify the user that schedule changes will be activate only in the # next hour if obj.active: flash('Schedule changes will get applied in one hour', 'warning')