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'
Created #174: [#4737] 'send_simple' AttributeError when saving a ticket (2cp)
Related
Tickets:
#4737Seems like method that creates
Notification
object returnsNone
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.
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.Closed #174. Branch 42cc_4737.