Index: /WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py	(revision 2169)
+++ /WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py	(revision 2170)
@@ -54,4 +54,5 @@
 object = {}
 ds = []
+found = False
 
 validate = not search
@@ -59,6 +60,7 @@
 if reg_no:
     brains = context.applicants_catalog(reg_no = reg_no)
-    
+
     if len(brains) == 1:
+        found = True
         for field in context.applicants_catalog.schema():
             object[field] = getattr(brains[0],field,None)
@@ -71,7 +73,7 @@
                                      commit = False,
                                     )
-                                    
-                                    
-                                    
+
+
+
 if psm == 'invalid':
     return context.apply_pume_manage_form(rendered = res,
@@ -81,5 +83,6 @@
                                   )
 elif psm == '':
-    psm = 'Registration Number not found!'
+    if search and not found:
+        psm = 'Registration Number not found!'
     return context.apply_pume_manage_form(rendered = res,
                                    psm = psm,
@@ -89,5 +92,5 @@
     psm = ''
     pass
-    
+
 data = {}
 dm = ds.getDataModel()
@@ -110,21 +113,16 @@
     logger.info('%s edited application record of %s' % (member,reg_no))
 
-#set_trace()
 
+for field in context.applicants_catalog.schema():
+    object[field] = getattr(brains[0],field,None)
 
-if reg_no:
-    brains = context.applicants_catalog(reg_no = reg_no)
-    if len(brains) == 1:
-        for field in context.applicants_catalog.schema():
-            object[field] = getattr(brains[0],field,None)
-        res,psm_dummy,ds = lt.renderLayout(layout_id= 'application_manage',
-                                     schema_id= 'application',
-                                     layout_mode = "edit",
-                                     context=context,
-                                     ob=object,
-                                     commit = False,
-                                    )
-    else:
-        psm = "reg no %s not found" % reg_no
+res,psm_dummy,ds = lt.renderLayout(layout_id= 'application_manage',
+                             schema_id= 'application',
+                             layout_mode = "edit",
+                             context=context,
+                             ob=object,
+                             commit = False,
+                            )
+    
 
 return context.apply_pume_manage_form(rendered = res,
