Skip to content

Commit

Permalink
Merge pull request #15 from BertrandBordage/master
Browse files Browse the repository at this point in the history
Handles empty ForeignKeys.
  • Loading branch information
chrisdev committed Mar 26, 2014
2 parents d9a76ad + 6e7ab26 commit 8fe6d84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_pandas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def replace_pk(model):
base_cache_key = get_base_cache_key(model)

def inner(pk):
if pk is None:
return
cache_key = base_cache_key % pk
out = cache.get(cache_key, None)
if out is None:
Expand Down

0 comments on commit 8fe6d84

Please sign in to comment.