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

Api serializers #4

Merged
merged 44 commits into from
Jul 16, 2024
Merged

Api serializers #4

merged 44 commits into from
Jul 16, 2024

Conversation

SalmanAsh
Copy link
Contributor

@SalmanAsh SalmanAsh commented Jul 12, 2024

This change is Reviewable

Copy link
Contributor

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 24 files at r1, 19 of 19 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @SalmanAsh)


api/serializers/agreement_signature.py line 17 at r2 (raw file):

    class Meta:
        model = AgreementSignature
        fields = "__all__"

all is dangerous because if there were some fields that contained sensitive information that should not be returned to the front end, they would be returned. It's safer to manually specify the fields you want to return.

fields = ["id", "contributor", "agreement_id", "signed_at"]

api/serializers/contributor.py line 16 at r2 (raw file):

    class Meta:
        model = Contributor
        fields = "__all__"

all is dangerous because if there were some fields that contained sensitive information that should not be returned to the front end, they would be returned. It's safer to manually specify the fields you want to return.

fields = ["id", "email", "name", "location", "html_url", "avatar_url"]

Copy link
Contributor

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SalmanAsh)

@SalmanAsh SalmanAsh merged commit 7b59088 into development Jul 16, 2024
7 of 8 checks passed
@SalmanAsh SalmanAsh deleted the api-serializers branch July 16, 2024 14:03
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