Created
July 9, 2012 19:59
-
-
Save darkwing/3078551 to your computer and use it in GitHub Desktop.
This file contains 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
parent_id = request.POST.get('parent_id', '') | |
# Attempt to set a parent | |
if show_translation_parent_block and parent_id: | |
try: | |
parent_doc = get_object_or_404(Document, id=parent_id) | |
doc.parent = parent_doc | |
except Document.DoesNotExist: | |
logging.debug('Could not find posted parent') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment