Changeset 758 for branches/features/taskProcedureRework/grails-app/controllers/TaskProcedureDetailedController.groovy
- Timestamp:
- Jan 26, 2011, 3:29:08 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/taskProcedureRework/grails-app/controllers/TaskProcedureDetailedController.groovy
r403 r758 50 50 if(taskProcedureInstance) { 51 51 try { 52 taskProcedureInstance.tasks.each { 53 it.taskProcedure = null 54 } 52 55 taskProcedureInstance.delete(flush:true) 53 56 flash.message = "TaskProcedure ${params.id} deleted" … … 125 128 def save = { 126 129 def taskProcedureInstance = new TaskProcedure(params) 127 def taskInstance = Task.get(params. taskInstance.id)130 def taskInstance = Task.get(params.parentTask.id) 128 131 129 132 if(!taskProcedureInstance.hasErrors() && taskProcedureInstance.save(flush: true)) { 130 taskProcedureInstance.addToTasks(taskInstance) 133 taskProcedureInstance.addToTasks(taskInstance) // also sets: taskInstance.taskProcedure = taskProcedureInstance 131 134 flash.message = "TaskProcedure ${taskProcedureInstance.id} created." 132 135 redirect(action:show,id:taskProcedureInstance.id)
Note: See TracChangeset
for help on using the changeset viewer.