-
Notifications
You must be signed in to change notification settings - Fork 256
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
organisation api completed #629
organisation api completed #629
Conversation
✅ Deploy Preview for activist-org canceled.
|
Thank you for the pull request!The activist team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Development rooms once you're in. It'd be great to have you! Maintainer checklist
|
@bharath637462 we need to you to follow directions on what the work you're supposed to be doing is. #627 is assigned to me. You wrote into the issue asking if you could work on it, and you were not given permission to work on it. Please do not do any other backend API work at this time, and please focus on completing the work for #611. Once that is done you can begin working on #628 or another API issue once we have assigned it to you. @to-sta and I will review this, but understand that further PRs like this where you haven't been assigned will be closed. |
Do not send along further commits to this issue. We'll finalize it ourselves. |
Workflows: Here is an example: backend/entities/views.py:48: note: Superclass:
backend/entities/views.py:48: note: def create(self, request: Request, *args: Any, **kwargs: Any) -> Response
backend/entities/views.py:48: note: Subclass:
backend/entities/views.py:48: note: def create(self, request: Request) -> Response Since we do not use *args and **kwargs we are overwritting the Superclass. I would say we ignore that issue and add a top level comment again with: # mypy: disable-error-code="override" API: The workflow for creating a Organization would be:
Should we add a unqiue constrant to the name field of Organization model? Other then that the create method looks fine to me! |
I'll check this out a bit later, @to-sta. Wanted to remove the frontend changes so we're fresh :) Thanks for the details you've sent along! |
@andrewtavis I added the models for status as discussed. I added I made some changes to the serializer, now the class OrganizationSerializer(serializers.ModelSerializer[Organization]):
class Meta:
model = Organization
exclude = ["deletion_date"]
extra_kwargs = {
"created_by": {"read_only": True},
"social_accounts": {"required": False},
"status_updated": {"read_only": True},
"acceptance_date": {"read_only": True},
} |
I additionally removed the logic from update, partial_update and destroy, since these methods still need to be properly implemented. Since these 3 methods only have pass instead of a return value the ci_backend workflow is failing. |
Thinking about the destroy method of the org API. We have a Keep the org after deletion (any fields that should be removed?), set a |
@to-sta, sorry for the broken backend run. There were a couple merge conflicts that needed to get figured out (rushed it a bit and just used GitHub for them as they seemed to be just accounting for some additions from other commits). I don't think that any of the changes that came through in this would be problematic, but maybe it's because there are parts of the code in here now that aren't accounted for in this PR as it's coming from other commits? Can you do a quick fix of the backend errors and I'll bring this in? |
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.
Thank you for all the hard work here, @to-sta! (also for the quick fixes just now 😅) So happy to have this finalized 🚀
Contributor checklist
Description
Related issue