ソースを参照

Fix missing slash in UID when POSTing to root. (#26)

Stefano Cossu 7 年 前
コミット
3b0c77f57b
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lakesuperior/model/ldp_factory.py

+ 1 - 1
lakesuperior/model/ldp_factory.py

@@ -201,7 +201,7 @@ class LdpFactory:
             raise ValueError('Slug cannot start with a slash.')
         # Shortcut!
         if not path and parent_uid == '/':
-            return split_if_legacy(str(uuid4()))
+            return '/' + split_if_legacy(str(uuid4()))
 
         if not parent_uid.startswith('/'):
             raise ValueError('Invalid parent UID: {}'.format(parent_uid))