#4737 'send_simple' AttributeError when saving a ticket [ss252]

v1.0.0
closed
nobody
General
2015-08-20
2012-08-17
No
Module allura.model.discuss:183 in add_post
<<      def add_post(self, **kw):
               """Helper function to avoid code duplication."""
               p = self.post(**kw)
               p.commit()
               self.num_replies += 1
>>  p = self.post(**kw)
Module allura.model.discuss:217 in post
<<              log.info('Auto-approving message from %s', c.user.username)
                   file_info = kw.get('file_info', None)
                   post.approve(file_info)
               else:
                   self.notify_moderators(post)
>>  post.approve(file_info)
Module allura.model.discuss:528 in approve
<<                  self.acl, author.project_role()._id, 'unmoderated_post')
               g.post_event('discussion.new_post', self.thread_id, self._id)
               self.notify(file_info=file_info)
               artifact = self.thread.artifact or self.thread
               session(self).flush()
>>  self.notify(file_info=file_info)
Module allura.model.discuss:552 in notify
<<              if hasattr(artifact, 'notify_post'):
                       if artifact.notify_post:
                           n.send_simple(artifact.monitoring_email)
                   else:  # Send if no extra checks required
                       n.send_simple(artifact.monitoring_email)
>>  n.send_simple(artifact.monitoring_email)
AttributeError: 'NoneType' object has no attribute 'send_simple'

Related

Tickets: #4737

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-08-24
    • summary: 'send_simple' AttributeError when saving a ticket --> 'send_simple' AttributeError when saving a ticket [ss252]
    • size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2012-09-07
    • labels: --> p2
     
  • Dave Brondsema

    Dave Brondsema - 2012-09-20
    • labels: p2 --> p2, 42cc
    • milestone: forge-oct-05 --> forge-backlog
     
  • Igor Bondarenko - 2012-09-21

    Created #174: [#4737] 'send_simple' AttributeError when saving a ticket (2cp)

    • status: open --> in-progress
     

    Related

    Tickets: #4737

  • Igor Bondarenko - 2012-09-24

    Seems like method that creates Notification object returns None only if notifications are disabled for entire project (project.notifications_disabled == True).

    Dave, could you please check if notifications for the project which caused the error are disabled? If it is so, I will push the fix.

     
  • Dave Brondsema

    Dave Brondsema - 2012-09-24

    It's quite likely that that is the case. We've had an issue where projects get notifications_disabled stuck to True. A few days ago we reset that to False for several hundred projects. I don't know exactly which projects those were, but I think it's safe to assume it was the cause for this project's error.

     
  • Igor Bondarenko - 2012-09-27
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2012-09-27

    Closed #174. Branch 42cc_4737.

     
  • Dave Brondsema

    Dave Brondsema - 2012-09-28
    • status: code-review --> closed
    • qa: Dave Brondsema
    • size: 2 --> 0
    • milestone: forge-backlog --> forge-oct-05
     

Log in to post a comment.