yangzhang75 commented on code in PR #8125:
URL: https://github.com/apache/texera/pull/8125#discussion_r3890618378


##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala:
##########
@@ -439,6 +442,14 @@ class WorkflowResource extends LazyLogging {
   @Path("/persist")
   def persistWorkflow(workflow: Workflow, @Auth sessionUser: SessionUser): 
Workflow = {
     val user = sessionUser.getUser
+
+    // `is_form_view` is owned by /enable-form-view and /disable-form-view 
alone; a plain save
+    // sends the whole POJO to workflowDao.update, so without this its default 
clears the flag.
+    if (workflow.getWid != null) {
+      Option(workflowDao.fetchOneByWid(workflow.getWid))
+        .foreach(stored => workflow.setIsFormView(stored.getIsFormView))

Review Comment:
   Fixed — persist now updates only the fields a save owns 
(name/description/content/is_public) via an explicit column update, so 
is_form_view is never written by a save. No fetch, no read-modify-write window; 
/enable-form-view and /disable-form-view stay the only writers.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to