File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -221,15 +221,17 @@ def create_share(
221221 url = self .get_local_url ()
222222 if public_upload :
223223 public_upload = "true"
224- if (path is None or not isinstance (share_type , int )) or (share_type in [0 , 1 ] and share_with is None ):
224+ if (path is None or not isinstance (share_type , int )) \
225+ or (share_type in [ShareType .GROUP , ShareType .USER , ShareType .FEDERATED_CLOUD_SHARE ]
226+ and share_with is None ):
225227 return False
226228
227229 data = {"path" : path , "shareType" : share_type }
228230 if share_type in [ShareType .GROUP , ShareType .USER , ShareType .FEDERATED_CLOUD_SHARE ]:
229231 data ["shareWith" ] = share_with
230232 if public_upload :
231233 data ["publicUpload" ] = public_upload
232- if share_type == 3 and password is not None :
234+ if share_type == ShareType . PUBLIC_LINK and password is not None :
233235 data ["password" ] = str (password )
234236 if permissions is not None :
235237 data ["permissions" ] = permissions
You can’t perform that action at this time.
0 commit comments