Skip to content
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

Add TeamCreateAPI view #937

Open
wants to merge 1 commit into
base: add-delete-user-endpoint
Choose a base branch
from

Conversation

Oksamies
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Oksamies commented Dec 11, 2023

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Oksamies and the rest of your teammates on Graphite Graphite

@Oksamies Oksamies force-pushed the 12-11-Add_TeamCreateAPI_view branch 2 times, most recently from a4d49e7 to f078a48 Compare December 12, 2023 09:49
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (add-delete-user-endpoint@1d0e07f). Learn more about missing BASE report.

Current head f5c8062 differs from pull request most recent head ee40259

Please upload reports for the commit ee40259 to get more accurate results.

Additional details and impacted files
@@                     Coverage Diff                     @@
##             add-delete-user-endpoint     #937   +/-   ##
===========================================================
  Coverage                            ?   93.07%           
===========================================================
  Files                               ?      299           
  Lines                               ?     8755           
  Branches                            ?      780           
===========================================================
  Hits                                ?     8149           
  Misses                              ?      500           
  Partials                            ?      106           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@MythicManiac MythicManiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small but important changes needed


form = CreateTeamForm(
user=request.user,
data=request.data,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neve ruse request.data directly when you use serializers to validate it; use serializer.validated_data

name = serializers.CharField()


class TeamCreateAPIView(APIView):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing permission classes (user needs to be authenticated)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the new views should now have IsAuthenticated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants