Created
August 25, 2019 03:07
-
-
Save ryan2clw/9f9c68fc79342541f8ad085e05aedbe0 to your computer and use it in GitHub Desktop.
remove excess data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Keep the rest of BallSerializer) | |
def to_representation(self, instance): | |
""" Get rid of excess data, makes it easier to consume on the client """ | |
ret = super().to_representation(instance) | |
ret.pop('updated_at') | |
ret.pop('is_played') | |
return ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment