Browse Source

[doc2] Add auto UUID for the short link

Until we get a proper URL shortening function
Romain Rigaux 10 năm trước cách đây
mục cha
commit
45890eb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      desktop/core/src/desktop/models.py

+ 1 - 1
desktop/core/src/desktop/models.py

@@ -967,7 +967,7 @@ class Document2Permission(models.Model):
     (COMMENT_PERM, 'comment'), # PLAYER PERM?    
   ))
 
-  link = models.CharField(default='', max_length=255, unique=True) # Short link like dropbox
+  link = models.CharField(default=uuid_default, max_length=255, unique=True) # Short link like dropbox
 
   class Meta:
     unique_together = ('doc', 'perms')