LP1845240 Survey API returns updated fleshed survey user/berick/lp1845240-survey-api-modernize
authorBill Erickson <berickxx@gmail.com>
Fri, 18 Oct 2019 19:51:40 +0000 (15:51 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 18 Oct 2019 19:51:40 +0000 (15:51 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm

index 11342d3..2a33a39 100644 (file)
@@ -81,7 +81,16 @@ sub update_survey {
 
     $e->commit;
 
-    return 1;
+    $e->xact_begin;
+    $survey = $e->retrieve_action_survey([
+        $survey->id, 
+        {   flesh => 2, 
+            flesh_fields => {asv => ['questions'], 'asvq' => ['answers']}
+        }
+    ]);
+    $e->rollback;
+
+    return $survey;
 }
 
 # returns undef on success, event on error