Index: trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 28113)
+++ trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 28115)
@@ -1045,4 +1045,6 @@
     $last_project = $proj_hash->[0];
 
+    $ipprc->define_camera($last_project->{camera});
+
     return $last_project;
 }
@@ -1105,6 +1107,4 @@
     close $pointsList;
 
-    # XXX: need to loop over these
-    # my $run = $runList->[0];
     if (($req_type eq "byid") or ($req_type eq "byexp")) {
         my ($last_tess_id, $tess_dir_abs, $astrom_file) = ("", "", "");
@@ -1114,5 +1114,15 @@
                 # XXX: use file rule and handle cameras where the astrometry is solved at
                 # the chip stage.
-                $astrom_file = $run->{cam_path_base} . ".smf";
+                my $cam_path_base = $run->{cam_path_base};
+                if ($cam_path_base) {
+                    $astrom_file = $run->{cam_path_base} . ".smf";
+                } else {
+                    if (! find_astrometry($ipprc, $imagedb, $run, $verbose) ) {
+                        setErrorCodes($rowList, $PSTAMP_NOT_AVAILABLE);
+                        next;
+                    }
+                    $cam_path_base = $run->{cam_path_base};
+                    $astrom_file = $run->{astrom_file};
+                }
                 my $astrom_file_resolved = $ipprc->file_resolve($astrom_file);
                 if (!$astrom_file_resolved) {
