Skip to content

Conversation

@robmackenzie
Copy link
Contributor

No description provided.

@robmackenzie robmackenzie changed the title Rmackenzie/fix double users Fix the double users showing in results Jul 30, 2025
Copy link

@EricNelson12 EricNelson12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but otherwise lgtm!

# Need to do a quick simple de-dupe due to a bug in the pagination from Discourse
deduped_list=[]
for user in results:
if user not in deduped_list:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the type of user? if it's a reference to a class or dict or something then the user not in deduped_list might not work as it appears to if the same user has had two difference instances made. BUT I'm assuming it's a string with their username, in which case this should be good 😄

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if they are just strings, then can we go list(set(users)) to de-dup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User is a dict. results is a list of those dicts.

NB: we discussed this in slack

@robmackenzie robmackenzie merged commit 33a1112 into main Jul 30, 2025
1 check passed
@robmackenzie robmackenzie deleted the rmackenzie/fix-double-users branch July 30, 2025 01:56
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

Successfully merging this pull request may close these issues.

2 participants