Merge branch 'master' into lqc-trunk
[redakcja.git] / apps / api / models.py
index 90f962e..cd9a395 100644 (file)
@@ -41,7 +41,7 @@ class PullRequest(models.Model):
 
     # revision to be merged into the main branch
     source_revision = models.CharField(max_length=40, unique=True)
-    target_revision = models.CharField(max_length=40)
+    target_revision = models.CharField(max_length=40, blank=True)
 
     # current status
     status = models.CharField(max_length=1, choices=REQUEST_STATUSES.items())
@@ -59,7 +59,7 @@ class PullRequest(models.Model):
 
     class Meta:
         permissions = (           
-            ("pullrequest.can_view", "Can view pull request's contents."),
+            ("view_prq", "Can view pull request's contents."),
         )
 
 
@@ -68,6 +68,6 @@ class PullRequest(models.Model):
 class Document(models.Model):
     class Meta:
         permissions = (
-            ("document.can_share", "Can share documents without pull requests."),
-            ("document.can_view_other", "Can view other's documents."),
+            ("share_document", "Can share documents without pull requests."),
+            ("view_other_document", "Can view other's documents."),
         )    
\ No newline at end of file