django-debug-toolbar icon indicating copy to clipboard operation
django-debug-toolbar copied to clipboard

handling the case if return_value is None in get_many

Open lokeshatbigbasket opened this issue 7 years ago • 5 comments

Hi,

I ran into a case where I am trying get_many with empty list, in that case, debug toolbar is throwing exception and the toolbar is not appearing. Here I came up with a fix. I think that if return_value is None it's neither a cache miss nor a cache hit right??? Please review and merge if the code is correct.

lokeshatbigbasket avatar Jan 20 '18 14:01 lokeshatbigbasket

Hey @robhudson and @aaugustin,

can you both review the above PR ???

lokeshatbigbasket avatar Jan 20 '18 14:01 lokeshatbigbasket

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@e78ac8c). Click here to learn what that means. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1029   +/-   ##
=========================================
  Coverage          ?   84.15%           
=========================================
  Files             ?       24           
  Lines             ?     1294           
  Branches          ?      176           
=========================================
  Hits              ?     1089           
  Misses            ?      156           
  Partials          ?       49
Impacted Files Coverage Δ
debug_toolbar/panels/cache.py 80.35% <0%> (ø)

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 e78ac8c...e3bb007. Read the comment docs.

codecov[bot] avatar Jan 20 '18 14:01 codecov[bot]

I'm sorry, I'm not working on this project anymore.

aaugustin avatar Jan 22 '18 17:01 aaugustin

Could you add a test?

jdufresne avatar Apr 05 '18 14:04 jdufresne

@lokeshatbigbasket please add a test so is more clear what do you want to fix. Thank you.

camilonova avatar Jul 21 '18 15:07 camilonova

I'm closing this pull request because of inactivity, not rejecting the feature. Please resubmit if you still want to work on this, after resolving the conflicts and adding a unit test.

matthiask avatar Sep 16 '22 14:09 matthiask