diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-07-11 12:53:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-11 12:53:20 +0200 |
| commit | e231c3f3dbfa60c58eb39d090fa0ab2d1b4c5c91 (patch) | |
| tree | 790e6f2219cdad596eaeb25944641438a3b57cc5 /foundation | |
| parent | df909098ba9ebcfc3eebed4e14acc8aed8d0f644 (diff) | |
Updated to django-money==0.15
Diffstat (limited to 'foundation')
| -rw-r--r-- | foundation/models.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/foundation/models.py b/foundation/models.py index d5b885ae..62d3cc4e 100644 --- a/foundation/models.py +++ b/foundation/models.py @@ -1,3 +1,5 @@ +from decimal import Decimal + from django.conf import settings from django.db import models from django.urls import reverse @@ -77,7 +79,12 @@ class Meeting(models.Model): non_board_attendees = models.ManyToManyField( NonBoardAttendee, related_name='meetings_attended', blank=True ) - treasurer_balance = MoneyField(max_digits=10, decimal_places=2, default_currency='USD') + treasurer_balance = MoneyField( + max_digits=10, + decimal_places=2, + default_currency='USD', + default=Decimal('0.0'), + ) treasurer_report = models.TextField(blank=True) treasurer_report_html = models.TextField(editable=False) @@ -113,7 +120,12 @@ class ApprovedGrant(models.Model): """ entity = models.CharField(max_length=255) - amount = MoneyField(max_digits=10, decimal_places=2, default_currency='USD') + amount = MoneyField( + max_digits=10, + decimal_places=2, + default_currency='USD', + default=Decimal('0.0'), + ) approved_at = models.ForeignKey( Meeting, related_name='grants_approved', on_delete=models.CASCADE ) |
