def _get_command(self, command_id): with transaction.commit_manually(): transaction.commit() return Command.objects.get(pk = command_id)