Skip to content

Pyral returns incorrect results for ConversationPosts sometimes #188

@RebeccaMcCann-Young

Description

@RebeccaMcCann-Young

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions