-
Notifications
You must be signed in to change notification settings - Fork 0
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
Exceptions #21
Exceptions #21
Conversation
Codecov Report
@@ Coverage Diff @@
## main #21 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 138 148 +10
Branches 20 21 +1
=========================================
+ Hits 138 148 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -25,13 +25,18 @@ def user_id_filter_required(self) -> bool: | |||
async def retrieve_object( | |||
self, resource_class: Any, resource_id: str | |||
) -> Any: | |||
resource_id = ( |
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.
test?
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.
Es el segundo punto del PR
@@ -76,18 +81,18 @@ def wrapper_resource_class(cls): | |||
|
|||
@self.delete(path + '/{id}') | |||
@copy_attributes(cls) | |||
async def delete(id: str): | |||
async def delete(id: str, request: Request): |
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.
porque sería necesario acceder al request desde estos métodos?
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.
Hay situaciones donde el método delete
tiene un tiempo de expiración en el body como aquí, este solo puede obtenerse del objeto Request
me
lo sustituye por eluser_id
user_id
cuando no existe en el modelocopy_attributes
para no sustituir atributos privadosdelete
el objetoRequest
. Requerido cuando necesitas acceder al cuerpo de la petición