rtcharity / eahub.org

A global directory for effective altruists to connect
https://eahub.org
MIT License
18 stars 6 forks source link

Profile must be saved twice before being indexed for search results #1321

Closed ruthgrace closed 1 year ago

ruthgrace commented 1 year ago

Hello, It looks like profiles must be saved twice before getting indexed properly for search results. I saw this happen with my profile as well as my friend Mateo. To replicate, edit profile and add a new group under EA Groups. Then, search for all the members of that group. Your profile may not show up in the list unless you click the Save button for editing your profile multiple times. Let me know if you need any more info on this bug. We are using EA Hub as our people directory for the Effective Altruism Gather Town. (https://eahub.org/group/effective-altruism-gather-town-always-on-virtual-c/) Thanks Ruth

viktor-yunenko commented 1 year ago

Hey @sebgrebe , so I also was able to replicate it. Not sure about the reason, but when I have a bug like that a poor first patch might just be post_save django signal that calls save again, without triggering another post_save signal :)

sebgrebe commented 1 year ago

Thanks for raising this, @ruthgrace. Just deployed the fix.

@victor-yunenko, fix was this: https://github.com/rtcharity/eahub.org/pull/1322/files#diff-eb0e45a3c0f828496281f9f63e42a4c0c1b2d3a9ed8a4daf0bbaf53e3f3646e7R145

@ruthgrace, are you aware that the Hub intends to shutdown eventually? The Groups functionality of the EA Forum is coming along nicely. You might want to use this in the future.