Index: trunk/pstamp/scripts/pstamp_finish.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_finish.pl	(revision 19279)
+++ trunk/pstamp/scripts/pstamp_finish.pl	(revision 19761)
@@ -163,5 +163,6 @@
         # unless $exp_id is null (e.g. stack images) get the metadata for this exposure
         my ($row, $req_info, $project) = get_request_info($rows, $rownum);
-        my ($image_db) = resolve_project($project);
+        my $proj_hash = resolve_project($project);
+        my $image_db = $proj_hash->{dbname};
         my $exp_info = get_exposure_info($image_db, $exp_id);
 
Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 19279)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 19761)
@@ -143,4 +143,5 @@
 
     $stamp_name = "" if $stamp_name eq "null";
+    $class_id = "" if ($class_id eq "null" or $class_id eq "all");
     
     # XXX: TODO: sanity check all parameters
@@ -151,5 +152,11 @@
     # trash the request.
     die "job_type is list_uri but mode is $mode" if ($job_type eq "list_uri") and ($mode ne "list_uri");
-    my ($image_db, $lookup_class_id, $camera, $magic_required ) = resolve_project($project, $img_type, $class_id);
+
+    my $proj_hash = resolve_project($ipprc, $project, $dbname);
+    die "project $project not found\n" unless $proj_hash;
+
+    my $image_db = $proj_hash->{dbname};
+    my $camera = $proj_hash->{camera};
+    my $need_magic = $proj_hash->{need_magic};
 
     my $roi_string;
@@ -182,5 +189,5 @@
 
     # Call PStamp::Job's locate_images routinte to get the parameters for this request specification
-    my $images = locate_images($ipprc, $image_db, $req_type, $img_type, $id, $lookup_class_id,
+    my $images = locate_images($ipprc, $image_db, $req_type, $img_type, $id, $class_id,
             $x, $y, $mjd_min, $mjd_max, $filter);
 
@@ -217,10 +224,10 @@
     } else {
         my $args = $roi_string ? $roi_string : "";
-        $args .= " -class_id $class_id" if ($class_id and ($class_id ne "null"));
+        $args .= " -class_id $class_id" if $class_id;
 
         # sequence number for the the job for a request spec. Not to be confused with job_id
         my $job_num = 0;
 
-        # XXX for raw and chip level images and class_id "null" if there are multiple images
+        # XXX TODO: for raw and chip level images and class_id "null" if there are multiple images
         # use -list instead of -file
         foreach my $image (@$images) {
@@ -248,5 +255,5 @@
 
             # XXX sounds like magic will be handled outside of the postage stamp server
-            #if ($magic_required) {
+            #if ($need_magic) {
             #    die "no magic mask available" if ! $image->{magic_mask};
             #    $args .= " -magic_mask $image->{magic_mask}" 
