HonzaKral/django-threadedcomments — pull request #59 by Andertaker (2014-10-09 10:55:18+00:00)
Title: Fix invalid state, which happen if signals raise exception

If "super(ThreadedComment, self).save(*args, **kwargs)" is not last in save method,
then exceptions in functions called by post_save signal will lead to invalid DataBase state.

For example: field `tree_path` in DB will be ""(empty string), then
def root_id(self):
return int(self.tree_path.split(PATH_SEPARATOR)[0])
equivalent to int('') and return
ValueError: invalid literal for int() with base 10: ''
so whole page with comments will be broken.

When "super .. .save(*args, **kwargs)" was in the

Tested on Django 1.6, Postgre