We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e57ca16 + 9e788c8 commit c6598d2Copy full SHA for c6598d2
1 file changed
pyral/entity.py
@@ -108,9 +108,10 @@ def __getattr__(self, name):
108
raise Exception('Unsupported attempt to retrieve context attribute')
109
110
rallyEntityTypeName = self.__class__.__name__
111
- entity_path, oid = self._ref.split(SLM_WS_VER)[-1].rsplit('/', 1)
112
- if entity_path.startswith('portfolioitem/'):
113
- rallyEntityTypeName = entity_path.split('/')[-1].capitalize()
+ PORTFOLIO_PREFIX = 'PortfolioItem_'
+ if rallyEntityTypeName.startswith(PORTFOLIO_PREFIX):
+ rallyEntityTypeName = re.sub(PORTFOLIO_PREFIX, '',
114
+ rallyEntityTypeName)
115
116
faultTrigger = "getattr fault detected on %s instance for attribute: %s (hydrated? %s)" % \
117
(rallyEntityTypeName, name, self._hydrated)
0 commit comments