diff --git a/babybuddy/management/commands/fake.py b/babybuddy/management/commands/fake.py index 516eadd4..5abeb117 100644 --- a/babybuddy/management/commands/fake.py +++ b/babybuddy/management/commands/fake.py @@ -132,7 +132,6 @@ class Command(BaseCommand): self._add_bmi_entry() last_bmi_entry_time = self.time - @transaction.atomic def _add_breastpump_entry(self): """ @@ -149,7 +148,6 @@ class Command(BaseCommand): child=self.child, amount=self.amount, time=self.time, notes=notes ).save() - @transaction.atomic def _add_diaperchange_entry(self): """ diff --git a/core/admin.py b/core/admin.py index ad7853d4..7e6bc963 100644 --- a/core/admin.py +++ b/core/admin.py @@ -77,7 +77,7 @@ class BreastpumpAdmin(ImportExportMixin, ExportActionMixin, admin.ModelAdmin): "amount", ) resource_class = BreastpumpImportExportResource - + class DiaperChangeImportExportResource(ImportExportResourceBase): class Meta: diff --git a/core/migrations/0019_breastpump.py b/core/migrations/0019_breastpump.py index e9e99055..74ac5132 100644 --- a/core/migrations/0019_breastpump.py +++ b/core/migrations/0019_breastpump.py @@ -3,10 +3,11 @@ from django.db import migrations, models import django.db.models.deletion + class Migration(migrations.Migration): dependencies = [ - ('core', '0018_bmi_headcircumference_height'), + ("core", "0018_bmi_headcircumference_height"), ] operations = [ diff --git a/core/models.py b/core/models.py index 9d0caa93..55bb650a 100644 --- a/core/models.py +++ b/core/models.py @@ -181,9 +181,7 @@ class Breastpump(models.Model): related_name="breastpump", verbose_name=_("Child"), ) - amount = models.FloatField( - blank=False, null=False, verbose_name=_("Amount") - ) + amount = models.FloatField(blank=False, null=False, verbose_name=_("Amount")) time = models.DateTimeField(blank=False, null=False, verbose_name=_("Time")) notes = models.TextField(blank=True, null=True, verbose_name=_("Notes"))