Skip to content

Commit

Permalink
don't move correct nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaab committed Feb 27, 2012
1 parent 8d61c50 commit 29fdf7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions exercises/management/commands/import_exercises.py
Expand Up @@ -53,11 +53,12 @@ def _import_old_list(exercises):
uncategorized.move_to(KhanExerciseTreeNode.tree.get(khan_id='math'))
for exercise in exercises:
try:
node, created = KhanExerciseTreeNode.tree.get_or_create(
node, created = KhanExerciseTreeNode.tree.get(
khan_id=exercise['name'])
node.live = exercise['live']
node.url = exercise['ka_url']
node.move_to(uncategorized)
node.display_name = exercise['display_name']
node.save()
except KhanExerciseTreeNode.DoesNotExist:
node = KhanExerciseTreeNode(
khan_id=exercise['name'],
Expand Down

0 comments on commit 29fdf7e

Please sign in to comment.