Index: openacs-4/packages/notifications/tcl/notification-request-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 29 May 2002 05:12:01 -0000 1.2 +++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 4 Jun 2002 06:44:02 -0000 1.3 @@ -21,13 +21,17 @@ } { create a new request } { - # Set up the vars - set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {request_id type_id user_id object_id interval_id delivery_method_id format} + set request_id [get_request_id -type_id $type_id -object_id $object_id -user_id $user_id] - # Create the request - set request_id [package_instantiate_object -extra_vars $extra_vars notification_request] + if {[empty_string_p $request_id]} { + # Set up the vars + set extra_vars [ns_set create] + oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {request_id type_id user_id object_id interval_id delivery_method_id format} + # Create the request + set request_id [package_instantiate_object -extra_vars $extra_vars notification_request] + } + return $request_id }