svn commit: r431033 - /incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r431033 - /incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp

jonesde
Author: jonesde
Date: Sat Aug 12 06:32:57 2006
New Revision: 431033

URL: http://svn.apache.org/viewvc?rev=431033&view=rev
Log:
Fixed webtools envsetup.jsp to work w/wout partyId

Modified:
    incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp

Modified: incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp?rev=431033&r1=431032&r2=431033&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp (original)
+++ incubator/ofbiz/trunk/framework/webtools/webapp/webtools/includes/envsetup.jsp Sat Aug 12 06:32:57 2006
@@ -26,9 +26,12 @@
     if (userLogin != null) request.setAttribute("userLogin", userLogin);
 
     GenericValue person = (GenericValue) session.getAttribute("_PERSON_");
-    if (person == null) {
-        person = userLogin == null ? null : userLogin.getRelatedOne("Person");
-        if (person != null) session.setAttribute("_PERSON_", person);
+    if (person == null && userLogin != null) {
+        ModelEntity modelUserLogin = userLogin.getModelEntity();
+        if (modelUserLogin.isField("partyId")) {
+            person = userLogin.getRelatedOne("Person");
+            if (person != null) session.setAttribute("_PERSON_", person);
+        }
     }
     if (person != null) request.setAttribute("person", person);