Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filters in TrainingDataDirectory.list #99

Merged

Conversation

yias
Copy link
Contributor

@yias yias commented Oct 9, 2024

Description

When setting a filter in TrainingDataDirectory.list, the dictionaries in to_raw_filters are not encoded to a json object correctly. This causes the server to crash and the request to return a 500 server error.

This PR fixes this issue with calling json.dumps to properly encode the disctionaries.

story: [sc-25499]

Test

  • tested against dev and pre-prod

@yias yias self-assigned this Oct 9, 2024
@yias yias added the bug Something isn't working label Oct 9, 2024
@yias yias requested a review from mmeisso October 9, 2024 18:31
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.52%. Comparing base (166351b) to head (d75fb43).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #99   +/-   ##
=======================================
  Coverage   83.51%   83.52%           
=======================================
  Files          44       44           
  Lines        2572     2573    +1     
=======================================
+ Hits         2148     2149    +1     
  Misses        424      424           

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

src/ansys/simai/core/data/types.py Outdated Show resolved Hide resolved
@yias yias requested a review from mmeisso October 10, 2024 11:45
@yias yias merged commit d8cf556 into main Oct 10, 2024
33 checks passed
@yias yias deleted the ibatzian/bug/sc-25499/sdk-trainingdatadirectory-list-with-filters branch October 10, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants