Skip to content

Conversation

lusmoura
Copy link
Collaborator

@lusmoura lusmoura commented Jun 17, 2024

Listing conversations did not return the most recent ones, giving the impression that conversations were not persisted.

AI Description

The get_conversations function in conversation.py has been updated to sort conversations by their creation date in descending order. This ensures that the most recently created conversations are retrieved first.

Code Changes:

  • The .order_by(Conversation.created_at.desc()) line has been added to the get_conversations function, specifying the sorting order.

Copy link
Collaborator

@EugeneLightsOn EugeneLightsOn left a comment

Choose a reason for hiding this comment

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

Looks good to me

@tianjing-li
Copy link
Collaborator

@lusmoura I think since Faker generates a random created_at your unit test is now undeterministic - you could look into adding a manual created_at, and maybe just increment the seconds by i

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@99e2994). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #223   +/-   ##
=======================================
  Coverage        ?   88.23%           
=======================================
  Files           ?      139           
  Lines           ?     4735           
  Branches        ?        0           
=======================================
  Hits            ?     4178           
  Misses          ?      557           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lusmoura lusmoura merged commit 3bd75b0 into main Jun 17, 2024
@lusmoura lusmoura deleted the luisa/fix_list_conversations branch June 17, 2024 18:04
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.

4 participants