We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 14ec865 + 234650e commit 9e788c8Copy full SHA for 9e788c8
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