def _notify_initiator(self): DraftRegistration = apps.get_model('osf.DraftRegistration') registration = self._get_registration() prereg_schema = RegistrationSchema.get_prereg_schema() draft = DraftRegistration.objects.get(registered_node=registration) if registration.registered_schema.filter(id=prereg_schema.id).exists(): mails.send_mail(draft.initiator.username, mails.PREREG_CHALLENGE_ACCEPTED, user=draft.initiator, registration_url=registration.absolute_url, mimetype='html')
def _email_template_context(self, user, node, is_authorizer=False, urls=None): registration = self._get_registration() prereg_schema = RegistrationSchema.get_prereg_schema() if registration.registered_schema.filter(pk=prereg_schema.pk).exists(): return { 'custom_message': ' as part of the Preregistration Challenge (https://cos.io/prereg)' } else: return {}