librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.11k stars 203 forks source link

fix: README scraping: duplicate key error #3189

Closed macowie closed 12 months ago

macowie commented 12 months ago

This may be an old issue or one that cropped up after Rails upgrades. But it looks like we're getting cases where the readme record associated to a repository exists in the database, but hasn't been loaded by ActiveRecord (or was inserted by another thread?), and the existing basic nil check doesn't work. Unless there's a bigger problem this should cut down on these snags.