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

Individual reactions #3520

Merged
merged 4 commits into from Nov 15, 2023
Merged

Individual reactions #3520

merged 4 commits into from Nov 15, 2023

Conversation

Bestem0r
Copy link
Contributor

@Bestem0r Bestem0r commented Nov 8, 2023

Adds a new field, reactions for the meeting serializer. This is used to show who reacted on the meeting on the frontend.

Frontend PR.

Screencast.from.08.nov.2023.kl.15.37.+0100.webm

Copy link

@MicheleAwada MicheleAwada left a comment

Choose a reason for hiding this comment

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

all is good
however PublicUserSerializer already gives out the id

so their no need to say

class ReactionsSerializer(serializers.ModelSerializer):
    author = PublicUserSerializer(read_only=True, source="created_by")
    class Meta:
        model = Reaction
        fields = ("id", "emoji", "created_by", "created_at", "author")
        read_only = True

just remove author from the fields and rename it to created_by

class ReactionsSerializer(serializers.ModelSerializer):
    created_by = PublicUserSerializer(read_only=True)
    class Meta:
        model = Reaction
        fields = ("id", "emoji", "created_by", "created_at")
        read_only = True

Copy link
Member

@eikhr eikhr left a comment

Choose a reason for hiding this comment

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

Looks good!

lego/apps/meetings/serializers.py Outdated Show resolved Hide resolved
lego/apps/meetings/serializers.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6e6a8dc) 88.21% compared to head (651a9de) 88.21%.
Report is 14 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3520   +/-   ##
=======================================
  Coverage   88.21%   88.21%           
=======================================
  Files         666      666           
  Lines       21083    21091    +8     
=======================================
+ Hits        18598    18606    +8     
  Misses       2485     2485           

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

@Bestem0r Bestem0r merged commit 78928cc into master Nov 15, 2023
3 checks passed
@Bestem0r Bestem0r deleted the individual-reactions branch November 15, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend review-needed Pull requests that need review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants