Navigation Menu

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 JSONB column where null #413

Merged
merged 8 commits into from Feb 1, 2022
Merged

fix JSONB column where null #413

merged 8 commits into from Feb 1, 2022

Conversation

dantownsend
Copy link
Member

@dantownsend dantownsend commented Jan 29, 2022

Related to #410

For example:

class RecordingStudio(Table):
    facilities = JSONB(null=True)

# This was causing an error:
await RecordingStudio.select().where(
    RecordingStudio.facilities.is_null()
)

The problem was due to a bug with how Piccolo serialises JSON values.

@dantownsend dantownsend added the bug Something isn't working label Jan 29, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2022

Codecov Report

Merging #413 (3164197) into master (c15eb0e) will decrease coverage by 0.03%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #413      +/-   ##
==========================================
- Coverage   90.87%   90.84%   -0.04%     
==========================================
  Files         103      103              
  Lines        6850     6867      +17     
==========================================
+ Hits         6225     6238      +13     
- Misses        625      629       +4     
Impacted Files Coverage Δ
piccolo/columns/base.py 95.16% <ø> (ø)
piccolo/columns/column_types.py 87.05% <71.42%> (-0.17%) ⬇️
piccolo/apps/playground/commands/run.py 38.88% <100.00%> (ø)
piccolo/columns/combination.py 94.52% <100.00%> (+0.15%) ⬆️
piccolo/query/base.py 85.50% <100.00%> (+0.14%) ⬆️
piccolo/utils/sql_values.py 90.90% <100.00%> (+0.90%) ⬆️
piccolo/query/methods/update.py 89.74% <0.00%> (-4.38%) ⬇️
piccolo/table.py 95.54% <0.00%> (ø)
piccolo/query/methods/delete.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c15eb0e...3164197. Read the comment docs.

@dantownsend dantownsend added this to High priority in Bugs Jan 30, 2022
@dantownsend dantownsend marked this pull request as ready for review January 30, 2022 22:45
@dantownsend dantownsend linked an issue Feb 1, 2022 that may be closed by this pull request
@dantownsend dantownsend merged commit a654254 into master Feb 1, 2022
Bugs automation moved this from High priority to Closed Feb 1, 2022
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
Bugs
Closed
Development

Successfully merging this pull request may close these issues.

Where JSONB column is_null produces incorrect query statement
3 participants