Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KTruong008/9112c2547df9f9efd6d03282cc7260ff to your computer and use it in GitHub Desktop.
Save KTruong008/9112c2547df9f9efd6d03282cc7260ff to your computer and use it in GitHub Desktop.
def perform_create(self, serializer):
deck = None
try:
from IPython import embed; embed();
deck = Deck.objects.get(pk=self.request.data.get(‘deck’, {}).get(‘id’, None))
except Deck.DoesNotExist:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment