-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Refactored base-email-view #358
Conversation
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.
@MihirKohli please check the details of the build / QA check failures.
openwisp_users/api/views.py
Outdated
user.first().is_staff is True | ||
and not qs.filter(pk=self.request.user.id).exists() | ||
user.first().is_staff is True | ||
and not qs.filter(pk=self.request.user.id).exists() |
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.
this should not be changed
openwisp_users/api/views.py
Outdated
def get_serializer_context(self): | ||
if getattr(self, 'swagger_fake_view', False): | ||
# To get rid of assertion error raised in | ||
# the dev server, and for schema generation |
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.
do not remove these comments please
5eb5aad
to
793c1e6
Compare
793c1e6
to
44be783
Compare
made changes do check it |
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.
made changes do check it
Please change the commit message to:
[refactor] Refactor BaseEmailView to use the FilterByParent mixin #354
Closes #354
@@ -198,7 +199,7 @@ def update(self, request, *args, **kwargs): | |||
) | |||
|
|||
|
|||
class BaseEmailView(ProtectedAPIMixin, GenericAPIView): | |||
class BaseEmailView(ProtectedAPIMixin, FilterByParent, GenericAPIView): |
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.
Yeah ok, we're inheriting from this FilterByParent
now but there's some code here in BaseEmailView which is now redundant and has to be removed, which is not being done in this patch, so the goal of the issue is not being reached yet.
@MihirKohli I am closing this PR due to inactivity. Feel free to re-open the PR if you want to continue with the requested changes. |
Resolved #354