فهرست منبع

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

Stefano Cossu 6 سال پیش
والد
کامیت
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))