search book list by chunk title,
[redakcja.git] / apps / dvcs / models.py
index ab5f77d..6cfda91 100644 (file)
@@ -10,7 +10,7 @@ from django.utils.translation import ugettext_lazy as _
 from mercurial import mdiff, simplemerge
 
 from django.conf import settings
-from dvcs.signals import post_commit
+from dvcs.signals import post_commit, post_publishable
 from dvcs.storage import GzipFileSystemStorage
 
 
@@ -125,7 +125,7 @@ class Change(models.Model):
         if self.revision is None:
             tree_rev = self.tree.revision()
             if tree_rev is None:
-                self.revision = 0
+                self.revision = 1
             else:
                 self.revision = tree_rev + 1
         return super(Change, self).save(*args, **kwargs)
@@ -167,7 +167,7 @@ class Change(models.Model):
     def set_publishable(self, publishable):
         self.publishable = publishable
         self.save()
-        post_publishable(sender=self, publishable=publishable).send()
+        post_publishable.send(sender=self, publishable=publishable)
 
 
 def create_tag_model(model):