+ def get_active_users(self, active_users = None):
+ if not active_users:
+ active_users = set()
+
+ active_users.add(self.author)
+
+ for node in self.children.all():
+ if not node.nis.deleted:
+ node.get_active_users(active_users)
+
+ return active_users
+
+ def get_last_edited(self):
+ if not self.last_edited:
+ try:
+ le = self.actions.exclude(action_type__in=('voteup', 'votedown', 'flag'), canceled=True).order_by('-action_date')[0]
+ self.last_edited = le
+ self.save()
+ except:
+ pass
+
+ return self.last_edited
+
+