codethesaurus / codethesaur.us

A polyglot developer reference tool to compare programming language concepts side-by-side! Great for learning new languages or using for reference.
https://codethesaur.us
GNU Affero General Public License v3.0
288 stars 170 forks source link

Bug: Reference lookups aren't logging in database #723

Closed geekygirlsarah closed 4 months ago

geekygirlsarah commented 5 months ago

Expected Behavior

Any reference page lookup should be storing what was looked up in the web_lookupdata table in the database

Actual Behavior

No lookup data is saving

Steps to Reproduce the Problem

  1. Lookup something (like Python version 3 functions)
  2. Look inside the SQLite (locally) or Postgres (if you set it up) to see the row isn't in there

Additional Info

Appears one hasn't been stored since Feb 2023. Maybe a migration could be added to catch this back up.

Frederic-Chopin commented 5 months ago

Hi Sarah, is it okay if I work on this? I just created a PR that resolves this issue: https://github.com/codethesaurus/codethesaur.us/pull/724

I modified the concepts function in views.py to ensure that store_lookup_info is always called, even when there is only one language, which is the case for the reference lookup. I defaulted the second language to an empty string when there is only one language. I also tested locally and it works now, and web_lookupdata stores reference lookup correctly. If there is any question please let me know!

github-actions[bot] commented 4 months ago

This issue has been inactive for 336 hours (14.00 days) and will be unassigned after 72 more hours (3.00 days). If you have questions, please leave a comment, message @codethesaurus or @geekygirlsarah on Twitter, or email coreteam@codethesaur.us.If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time.

geekygirlsarah commented 4 months ago

Commenting to keep open for @Frederic-Chopin to finish some unit tests

github-actions[bot] commented 4 months ago

This issue has been inactive for 348 hours (14.50 days) and will be unassigned after 60 more hours (2.50 days). If you have questions, please leave a comment, message @codethesaurus or @geekygirlsarah on Twitter, or email coreteam@codethesaur.us.If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time.

github-actions[bot] commented 4 months ago

This issue has been inactive for 420 hours (17.50 days) and is past the limit of 408 hours (17.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you for your interest in contributing to this project.