Index: /WAeUP_SRP/trunk/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1962)
+++ /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1963)
@@ -927,20 +927,22 @@
 
         # included only to change wf state from admitted to returning
-            new_state = f2t[pt]['wf_transition_returning']
-            sub_obj = getattr(student_obj,f2t[pt]['id'],None)
-            if sub_obj and new_state != "remain":
-                try:
-                    self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
-                except:
-                    #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))
-                    pass
-        wfaction = 'return'
-        try:
-            self.portal_workflow.doActionFor(student_obj,wfaction)
-            logger.info('%s, wf state changed' % sid)
-            any_change = True
-        except:
-            logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))
-            pass
+            if res[0].review_state == 'admitted'
+                new_state = f2t[pt]['wf_transition_returning']
+                sub_obj = getattr(student_obj,f2t[pt]['id'],None)
+                if sub_obj and new_state != "remain":
+                    try:
+                        self.portal_workflow.doActionFor(sub_obj,new_state,dest_container=sub_obj)
+                    except:
+                        #logger.info('%s, wf transition %s of %s failed' % (sid,new_state,sub_obj.id))
+                        pass
+        if res[0].review_state == 'admitted'
+            wfaction = 'return'
+            try:
+                self.portal_workflow.doActionFor(student_obj,wfaction)
+                logger.info('%s, wf state changed' % sid)
+                any_change = True
+            except:
+                logger.info('%s, wf transition failed, old state = %s' % (sid,res[0].review_state))
+                pass
         # end inclusion
 
