Ejemplo n.º 1
0
 def handle_post(self):
     self._create_relationship()
     self._update_new_reviewed_by()
     if (self.notification_type == Review.NotificationTypes.EMAIL_TYPE
             and self.status == Review.STATES.UNREVIEWED):
         add_notification(self,
                          Review.NotificationObjectTypes.REVIEW_CREATED)
Ejemplo n.º 2
0
 def handle_post(self):
   self._create_relationship()
   self._update_new_reviewed_by()
   if (self.notification_type == Review.NotificationTypes.EMAIL_TYPE and
       self.status == Review.STATES.UNREVIEWED and
           not isinstance(self.reviewable, synchronizable.Synchronizable)):
     add_notification(self, Review.NotificationObjectTypes.REVIEW_CREATED)
Ejemplo n.º 3
0
 def handle_post(self):
   """Handle POST request."""
   if self.email_message:
     self._add_comment_about(self.email_message)
   self._create_relationship()
   self._update_new_reviewed_by()
   if (self.notification_type == Review.NotificationTypes.EMAIL_TYPE and
       self.status == Review.STATES.UNREVIEWED and
           not isinstance(self.reviewable, synchronizable.Synchronizable)):
     add_notification(self, Review.NotificationObjectTypes.REVIEW_CREATED)
Ejemplo n.º 4
0
  def add_email_notification(self):
    """Add email notification of type STATUS_UNREVIEWED"""
    if isinstance(self, synchronizable.Synchronizable):
      # External objects should not be notified.
      return

    review_notif_type = self.review.notification_type
    if review_notif_type == Review.NotificationTypes.EMAIL_TYPE:
      add_notification(self.review,
                       Review.NotificationObjectTypes.STATUS_UNREVIEWED)
Ejemplo n.º 5
0
  def add_email_notification(self):
    """Add email notification of type STATUS_UNREVIEWED"""
    if isinstance(self, synchronizable.Synchronizable):
      # External objects should not be notified.
      return

    review_notif_type = self.review.notification_type
    if review_notif_type == Review.NotificationTypes.EMAIL_TYPE:
      add_notification(self.review,
                       Review.NotificationObjectTypes.STATUS_UNREVIEWED)
Ejemplo n.º 6
0
 def add_email_notification(self):
     """Add email notification of type STATUS_UNREVIEWED"""
     review_notif_type = self.review.notification_type
     if review_notif_type == Review.NotificationTypes.EMAIL_TYPE:
         add_notification(self.review,
                          Review.NotificationObjectTypes.STATUS_UNREVIEWED)