def _create_exploration(committer_id, exploration, commit_message, commit_cmds):
 exploration.validate()
 rights_manager.create_new_exploration_rights(exploration.id, committer_id)
 model = exp_models.ExplorationModel(id=exploration.id, category=exploration.category, title=exploration.title, objective=exploration.objective, language_code=exploration.language_code, tags=exploration.tags, blurb=exploration.blurb, author_notes=exploration.author_notes, skin_customizations=exploration.skin_instance.to_dict()['skin_customizations'], states_schema_version=exploration.states_schema_version, init_state_name=exploration.init_state_name, states={state_name: state.to_dict() for (state_name, state) in exploration.states.iteritems()}, param_specs=exploration.param_specs_dict, param_changes=exploration.param_change_dicts)
 model.commit(committer_id, commit_message, commit_cmds)
 exploration.version += 1
 create_exploration_summary(exploration.id, committer_id)

def _create_exploration ( committer_id , exploration , commit_message , commit_cmds ) : exploration . validate ( ) rights_manager . create_new_exploration_rights ( exploration . id , committer_id ) model = exp_models . ExplorationModel ( id = exploration . id , category = exploration . category , title = exploration . title , objective = exploration . objective , language_code = exploration . language_code , tags = exploration . tags , blurb = exploration . blurb , author_notes = exploration . author_notes , skin_customizations = exploration . skin_instance . to_dict ( ) [ 'skin_customizations' ] , states_schema_version = exploration . states_schema_version , init_state_name = exploration . init_state_name , states = { state_name : state . to_dict ( ) for ( state_name , state ) in exploration . states . iteritems ( ) } , param_specs = exploration . param_specs_dict , param_changes = exploration . param_change_dicts ) model . commit ( committer_id , commit_message , commit_cmds ) exploration . version += 1 create_exploration_summary ( exploration . id , committer_id )
ensures that rights for a new exploration are saved first .