Pyral returns incorrect results for ConversationPosts sometimes
RebeccaMcCann-Young opened this issue · 0 comments
RebeccaMcCann-Young commented
I've noticed in my Rally instance (SaaS), sometimes the pyral library returns incorrect results when querying for ConversationPost data - it returns 0 when there are numerous posts. I don't know why it's not consistent but it's not.
This code seems to work for the items that are just returning 0:
url = f'https://{server}/slm/webservice/v2.0/conversationpost?workspace={WORKSPACEURL}&query={query}&start=1&pagesize=20'
req = requests.get(url,headers=None, auth=auth)
resp = json.loads(req.content)
QueryResults = resp["QueryResult"]["Results"]
for result in QueryResults:
req = requests.get( result["_ref"], headers=None, auth=auth)
resp = json.loads(req.content)
I'm still fairly new to python and don't fully understand where it would belong/if it should be implemented a different way for the current codebase. I just wanted to raise this issue as I've spent time investigating it and would prefer to use pyral for my whole project if possible.