소스 검색

[doc2] Add auto UUID for the short link

Until we get a proper URL shortening function
Romain Rigaux 10 년 전
부모
커밋
45890ebc34
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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')