Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccountMembersApi.get_members call fails when the limit is greater than 20 #15

Open
painbank opened this issue Aug 9, 2023 · 5 comments

Comments

@painbank
Copy link

painbank commented Aug 9, 2023

api_response = api_instance.get_members(limit=limit, offset=offset, filter=filter, sort=sort)

response is last_seen needs set for sort, but it cannot be set correctly to any value that works.

it appears if last_seen is not set for a user, then this method doesn't return properly.

@lucywyman
Copy link

Hmmm I'm able to reproduce this, it seems like some members don't have a _lastSeen value set at all in the API...I'll see if we can either make that key optional, or if this is a bug in our API itself - thanks for raising this!

@lucywyman
Copy link

For what it's worth, if you can figure out which members don't have a _lastSeen value set, I was able to get this working using limit and offset to work around those members - but I get that that's a giant pain, especially if more than one member doesn't have _lastSeen set.

@scuba10steve
Copy link

Has there been any movement on this? I'm running into this same issue at the moment.

@lucywyman
Copy link

lucywyman commented Jan 25, 2024

Oh yes! My apologies, I should have updated this issue - we merged what should've been a fix about a week ago, but I'm seeing the same behavior too...I'll investigate.

Edit: I see, the issue is slightly different but...basically the same:

launchdarkly_api.exceptions.ApiTypeError: Invalid type for variable 'last_seen'. Required value type is int and passed type was NoneType at ['received_data']['items'][5]['last_seen']

Hmm...the value I'm seeing from the API is an int, I'll see if I can figure out where that's getting converted.

@scuba10steve
Copy link

It might be a situation where the last_seen field will have to be marked as an optional thing that is returned rather than required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants