Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #1 from mcordes/master

Here you go.
  • Loading branch information...
commit 174eaa9274170f45de98ffbe7deda7f37a34a829 2 parents dc2fd9e + 23be6cc
@reinbach authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 djmoney/models/
7 djmoney/models/
@@ -23,8 +23,11 @@ def __init__(self, field):
self.currency_field_name = currency_field_name(
def _money_from_obj(self, obj):
- return Money(obj.__dict__[], obj.__dict__[self.currency_field_name])
+ amount = obj.__dict__[]
+ if amount is None:
+ return None
+ return Money(amount, obj.__dict__[self.currency_field_name])
def __get__(self, obj, type=None):
if obj is None:
raise AttributeError('Can only be accessed via an instance.')

0 comments on commit 174eaa9

Please sign in to comment.
Something went wrong with that request. Please try again.