Author: jonesde
Date: Sat Aug 12 06:32:57 2006
New Revision: 431033
URL:
http://svn.apache.org/viewvc?rev=431033&view=revLog:
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);