Forum .LRN Q&A: progrem creating department in PG

Collapse
Posted by Rafael Calvo on
I just updated code from cvs, and get this when I try to create a department (after filling up the from and pressing submit):
Selection did not return a value, and no default was provided
           while executing
       "db_string select_node_id {}"
           (procedure "get_type_node_id" line 2)
           invoked from within
       "get_type_node_id $parent_type"
           (procedure "dotlrn_community::new_type" line 4)
           invoked from within
       "dotlrn_community::new_type  -community_type_key
"$department_key"  -parent_type "dotlrn_class_instance"  -pretty_name
$pretty_name  -description $desc..."
           ("uplevel" body line 2)
           invoked from within
       "uplevel 1 $transaction_code "
           (procedure "db_transaction" line 1)
           invoked from within
       "db_transaction {
                   dotlrn_community::new_type  -community_type_key
"$department_key"  -parent_type "dotlrn_class_instance"  -pretty_name
$pr..."
           (procedure "dotlrn_department::new" line 13)
           invoked from within
       "dotlrn_department::new  -pretty_name $pretty_name 
-description $description  -external_url $external_url"
           invoked from within
       "if {[form is_valid add_department]} {
           form get_values add_department  pretty_name description
external_url referer

           set department_key [dotlrn..."
           ("uplevel" body line 44)
Collapse
Posted by Arjun Sanyal on
You have to drop you db, update from CVS and reload. Some data was never inserted into the db due to this error, and the other problems you posted about are caused by the same thing.
Collapse
Posted by Rafael Calvo on
Arjun
thanks, I realized that was probably the case when I was having dinner last night.

cheers