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 Dict/Unicode bug #3475

Merged
merged 2 commits into from Oct 28, 2019
Merged

Fix Dict/Unicode bug #3475

merged 2 commits into from Oct 28, 2019

Conversation

ilan-gold
Copy link
Member

Related to the fix for #3435 we need to actually check types first -as I understand it, if the dict was stored and then is immediately reused, the django model returns a dict while a subsequent call later will return a string when it actually hits the database. Correct me if I'm wrong. In general, it's probably worth migrating to https://docs.djangoproject.com/en/1.9/ref/contrib/postgres/fields/#jsonfield once we have it. Feel free to comment

@codecov
Copy link

codecov bot commented Oct 23, 2019

Codecov Report

Merging #3475 into develop will decrease coverage by 0.02%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3475      +/-   ##
===========================================
- Coverage    87.44%   87.42%   -0.03%     
===========================================
  Files           96       96              
  Lines        16932    14843    -2089     
===========================================
- Hits         14807    12977    -1830     
+ Misses        2125     1866     -259
Impacted Files Coverage Δ
refinery/tool_manager/models.py 95% <0%> (-0.58%) ⬇️
refinery/core/models.py 82.63% <100%> (-1.11%) ⬇️
...nery/data_set_manager/single_file_column_parser.py 84.61% <0%> (-7.19%) ⬇️
refinery/data_set_manager/views.py 65.72% <0%> (-4.62%) ⬇️
refinery/analysis_manager/tasks.py 72.04% <0%> (-3.29%) ⬇️
refinery/data_set_manager/isa_tab_parser.py 64.87% <0%> (-3.13%) ⬇️
refinery/core/views.py 69.24% <0%> (-2.88%) ⬇️
refinery/file_store/tasks.py 58.37% <0%> (-2.05%) ⬇️
refinery/file_store/utils.py 68.93% <0%> (-1.81%) ⬇️
refinery/tool_manager/views.py 92.3% <0%> (-1.48%) ⬇️
... and 10 more

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 223158a...b41142f. Read the comment docs.

@hackdna
Copy link
Member

hackdna commented Oct 28, 2019

Yes, serialization happens when you call save(): https://docs.djangoproject.com/en/1.8/ref/models/instances/#what-happens-when-you-save
If you make sure the workflow is always read from the DB then checking the value type won't be necessary.

@ilan-gold ilan-gold merged commit d93e2fa into develop Oct 28, 2019
@ilan-gold ilan-gold deleted the ilan-gold/text-json-bug branch October 28, 2019 19:39
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.

None yet

2 participants