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

PLAT-320: _fetch_records casts nan values to str #174

Merged
merged 4 commits into from
Jul 25, 2024
Merged

Conversation

ethho
Copy link
Contributor

@ethho ethho commented Jul 24, 2024

Jira ticket: https://datajoint.atlassian.net/browse/PLAT-320
To be used for works-api PR: https://github.com/datajoint-company/works-api/pull/70

Commits

  • PLAT-320: cast nan in response to str
  • Benign refactor

@ethho ethho self-assigned this Jul 24, 2024
@ethho ethho added the bug Something isn't working label Jul 24, 2024
elif isinstance(non_blobs_row[attribute_name], np.generic):
val = non_blobs_row[attribute_name].item()
if isinstance(val, Number) and math.isnan(val):
row.append(str(val))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lines 207-8 are the logical change in this PR. We catch nan values and cast to str(nan).

@ethho ethho requested a review from yambottle July 24, 2024 22:41
@ethho ethho changed the title PLAT-320: backend coerces nan values to str PLAT-320: backend casts nan values to str Jul 24, 2024
@ethho ethho changed the title PLAT-320: backend casts nan values to str PLAT-320: _fetch_records casts nan values to str Jul 24, 2024
@ethho ethho marked this pull request as ready for review July 24, 2024 22:51
@yambottle yambottle merged commit e722645 into master Jul 25, 2024
16 checks passed
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