-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(BA-515): Let the vfolder REST API accept vfolder UUIDs as intended #3451
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: octodog <[email protected]>
Co-authored-by: octodog <[email protected]>
Co-authored-by: octodog <[email protected]>
Co-authored-by: octodog <[email protected]>
Co-authored-by: octodog <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…nstead of directly reading request.match_info
Co-authored-by: octodog <[email protected]>
Co-authored-by: octodog <[email protected]>
folder_name_or_id: str | uuid.UUID | ||
piece = request.match_info["name"] | ||
try: | ||
folder_name_or_id = uuid.UUID(piece) | ||
except ValueError: | ||
folder_name_or_id = piece | ||
return await handler( | ||
request, await resolve_vfolder_rows(request, perm, folder_name), *args, **kwargs | ||
request, | ||
await resolve_vfolder_rows(request, perm, folder_name_or_id), | ||
*args, | ||
**kwargs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about parsing folder id value to UUID in resolve_vfolder_rows()
rather than in with_vfolder_rows_resolved()
?
There are some handler functions that call resolve_vfolder_rows()
resolves #3450 (BA-515)
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--3451.org.readthedocs.build/en/3451/
📚 Documentation preview 📚: https://sorna-ko--3451.org.readthedocs.build/ko/3451/