Skip to content

Commit 2c83ba9

Browse files
committed
Make all new Report fields able to be blank. Relates #207.
1 parent ec8a5af commit 2c83ba9

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

tigaserver_app/migrations/0048_report_responses_to_column.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,91 +13,91 @@ class Migration(migrations.Migration):
1313
migrations.AddField(
1414
model_name='report',
1515
name='breeding_site_has_larvae',
16-
field=models.BooleanField(help_text='Either if the user perceived larvaes the breeding site.', null=True),
16+
field=models.BooleanField(help_text='Either if the user perceived larvaes the breeding site.', null=True, blank=True),
1717
),
1818
migrations.AddField(
1919
model_name='report',
2020
name='breeding_site_has_near_mosquitoes',
21-
field=models.BooleanField(help_text='Either if the user perceived mosquitoes near the breeding site (less than 10 meters).', null=True),
21+
field=models.BooleanField(help_text='Either if the user perceived mosquitoes near the breeding site (less than 10 meters).', null=True, blank=True),
2222
),
2323
migrations.AddField(
2424
model_name='report',
2525
name='breeding_site_has_water',
26-
field=models.BooleanField(help_text='Either if the user perceived water in the breeding site.', null=True),
26+
field=models.BooleanField(help_text='Either if the user perceived water in the breeding site.', null=True, blank=True),
2727
),
2828
migrations.AddField(
2929
model_name='report',
3030
name='breeding_site_in_public_area',
31-
field=models.BooleanField(help_text='Either if the breeding site is found in a public area.', null=True),
31+
field=models.BooleanField(help_text='Either if the breeding site is found in a public area.', null=True, blank=True),
3232
),
3333
migrations.AddField(
3434
model_name='report',
3535
name='breeding_site_type',
36-
field=models.CharField(choices=[('basin', 'Basin'), ('bucket', 'Bucket'), ('fountain', 'Fountain'), ('small_container', 'Small container'), ('storm_drain', 'Storm Drain'), ('well', 'Well'), ('other', 'Other')], help_text='Breeding site type.', max_length=32, null=True),
36+
field=models.CharField(choices=[('basin', 'Basin'), ('bucket', 'Bucket'), ('fountain', 'Fountain'), ('small_container', 'Small container'), ('storm_drain', 'Storm Drain'), ('well', 'Well'), ('other', 'Other')], help_text='Breeding site type.', max_length=32, null=True, blank=True),
3737
),
3838
migrations.AddField(
3939
model_name='report',
4040
name='chest_bite_count',
41-
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the chest.', null=True),
41+
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the chest.', null=True, blank=True),
4242
),
4343
migrations.AddField(
4444
model_name='report',
4545
name='event_environment',
46-
field=models.CharField(choices=[('indoors', 'Indoors'), ('outdoors', 'Outdoors'), ('vehicle', 'Inside vehicle')], help_text='The environment where the event took place.', max_length=16, null=True),
46+
field=models.CharField(choices=[('indoors', 'Indoors'), ('outdoors', 'Outdoors'), ('vehicle', 'Inside vehicle')], help_text='The environment where the event took place.', max_length=16, null=True, blank=True),
4747
),
4848
migrations.AddField(
4949
model_name='report',
5050
name='event_moment',
51-
field=models.CharField(choices=[('now', 'Now'), ('last_morning', 'Last morning'), ('last_midday', 'Last midday'), ('last_afternoon', 'Last afternoon'), ('last_night', 'Last night')], help_text='The moment of the day when the event took place.', max_length=32, null=True),
51+
field=models.CharField(choices=[('now', 'Now'), ('last_morning', 'Last morning'), ('last_midday', 'Last midday'), ('last_afternoon', 'Last afternoon'), ('last_night', 'Last night')], help_text='The moment of the day when the event took place.', max_length=32, null=True, blank=True),
5252
),
5353
migrations.AddField(
5454
model_name='report',
5555
name='head_bite_count',
56-
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the head.', null=True),
56+
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the head.', null=True, blank=True),
5757
),
5858
migrations.AddField(
5959
model_name='report',
6060
name='left_arm_bite_count',
61-
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the left arm.', null=True),
61+
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the left arm.', null=True, blank=True),
6262
),
6363
migrations.AddField(
6464
model_name='report',
6565
name='left_leg_bite_count',
66-
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the left leg.', null=True),
66+
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the left leg.', null=True, blank=True),
6767
),
6868
migrations.AddField(
6969
model_name='report',
7070
name='right_arm_bite_count',
71-
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the right arm.', null=True),
71+
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the right arm.', null=True, blank=True),
7272
),
7373
migrations.AddField(
7474
model_name='report',
7575
name='right_leg_bite_count',
76-
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the right leg.', null=True),
76+
field=models.PositiveSmallIntegerField(help_text='Number of bites reported in the right leg.', null=True, blank=True),
7777
),
7878
migrations.AddField(
7979
model_name='report',
8080
name='user_perceived_mosquito_abdomen',
81-
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The species of mosquito that the abdomen resembles, according to the user.', max_length=16, null=True),
81+
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The species of mosquito that the abdomen resembles, according to the user.', max_length=16, null=True, blank=True),
8282
),
8383
migrations.AddField(
8484
model_name='report',
8585
name='user_perceived_mosquito_legs',
86-
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The species of mosquito that the leg resembles, according to the user.', max_length=16, null=True),
86+
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The species of mosquito that the leg resembles, according to the user.', max_length=16, null=True, blank=True),
8787
),
8888
migrations.AddField(
8989
model_name='report',
9090
name='user_perceived_mosquito_thorax',
91-
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The species of mosquito that the thorax resembles, according to the user.', max_length=16, null=True),
91+
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The species of mosquito that the thorax resembles, according to the user.', max_length=16, null=True, blank=True),
9292
),
9393
migrations.AddField(
9494
model_name='report',
9595
name='user_perceived_mosquito_specie',
96-
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The mosquito specie perceived by the user.', max_length=16, null=True),
96+
field=models.CharField(choices=[('albopictus', 'Aedes albopictus'), ('aegypti', 'Aedes aegypti'), ('japonicus', 'Aedes japonicus'), ('koreicus', 'Aedes koreicus'), ('culex', 'Culex pipiens'), ('other', 'Other')], help_text='The mosquito specie perceived by the user.', max_length=16, null=True, blank=True),
9797
),
9898
migrations.AddField(
9999
model_name='report',
100100
name='bite_count',
101-
field=models.PositiveSmallIntegerField(editable=False, help_text='Total number of bites reported.', null=True),
101+
field=models.PositiveSmallIntegerField(editable=False, help_text='Total number of bites reported.', null=True, blank=True),
102102
),
103103
]

tigaserver_app/models.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ class Report(TimeZoneModelMixin, models.Model):
713713
)
714714

715715
event_environment = models.CharField(
716-
max_length=16, choices=EVENT_ENVIRONMENT_CHOICES, null=True,
716+
max_length=16, choices=EVENT_ENVIRONMENT_CHOICES, null=True, blank=True,
717717
help_text=_("The environment where the event took place.")
718718
)
719719

@@ -731,37 +731,37 @@ class Report(TimeZoneModelMixin, models.Model):
731731
)
732732

733733
event_moment = models.CharField(
734-
max_length=32, choices=EVENT_MOMENT_CHOICES, null=True,
734+
max_length=32, choices=EVENT_MOMENT_CHOICES, null=True, blank=True,
735735
help_text=_("The moment of the day when the event took place.")
736736
)
737737

738738
bite_count = models.PositiveSmallIntegerField(
739-
null=True, editable=False,
739+
null=True, blank=True, editable=False,
740740
help_text=_("Total number of bites reported.")
741741
)
742742

743743
head_bite_count = models.PositiveSmallIntegerField(
744-
null=True,
744+
null=True, blank=True,
745745
help_text=_("Number of bites reported in the head.")
746746
)
747747
left_arm_bite_count = models.PositiveSmallIntegerField(
748-
null=True,
748+
null=True, blank=True,
749749
help_text=_("Number of bites reported in the left arm.")
750750
)
751751
right_arm_bite_count = models.PositiveSmallIntegerField(
752-
null=True,
752+
null=True, blank=True,
753753
help_text=_("Number of bites reported in the right arm.")
754754
)
755755
chest_bite_count = models.PositiveSmallIntegerField(
756-
null=True,
756+
null=True, blank=True,
757757
help_text=_("Number of bites reported in the chest.")
758758
)
759759
left_leg_bite_count = models.PositiveSmallIntegerField(
760-
null=True,
760+
null=True, blank=True,
761761
help_text=_("Number of bites reported in the left leg.")
762762
)
763763
right_leg_bite_count = models.PositiveSmallIntegerField(
764-
null=True,
764+
null=True, blank=True,
765765
help_text=_("Number of bites reported in the right leg.")
766766
)
767767

@@ -782,20 +782,20 @@ class Report(TimeZoneModelMixin, models.Model):
782782
)
783783

784784
user_perceived_mosquito_specie = models.CharField(
785-
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True,
785+
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True, blank=True,
786786
help_text=_("The mosquito specie perceived by the user.")
787787
)
788788

789789
user_perceived_mosquito_thorax = models.CharField(
790-
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True,
790+
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True, blank=True,
791791
help_text=_("The species of mosquito that the thorax resembles, according to the user.")
792792
)
793793
user_perceived_mosquito_abdomen = models.CharField(
794-
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True,
794+
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True, blank=True,
795795
help_text=_("The species of mosquito that the abdomen resembles, according to the user.")
796796
)
797797
user_perceived_mosquito_legs = models.CharField(
798-
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True,
798+
max_length=16, choices=MOSQUITO_SPECIE_CHOICES, null=True, blank=True,
799799
help_text=_("The species of mosquito that the leg resembles, according to the user.")
800800
)
801801

@@ -818,23 +818,23 @@ class Report(TimeZoneModelMixin, models.Model):
818818
)
819819

820820
breeding_site_type = models.CharField(
821-
max_length=32, choices=BREEDING_SITE_TYPE_CHOICES, null=True,
821+
max_length=32, choices=BREEDING_SITE_TYPE_CHOICES, null=True, blank=True,
822822
help_text=_("Breeding site type.")
823823
)
824824
breeding_site_has_water = models.BooleanField(
825-
null=True,
825+
null=True, blank=True,
826826
help_text=_("Either if the user perceived water in the breeding site.")
827827
)
828828
breeding_site_in_public_area = models.BooleanField(
829-
null=True,
829+
null=True, blank=True,
830830
help_text=_("Either if the breeding site is found in a public area.")
831831
)
832832
breeding_site_has_near_mosquitoes = models.BooleanField(
833-
null=True,
833+
null=True, blank=True,
834834
help_text=_("Either if the user perceived mosquitoes near the breeding site (less than 10 meters).")
835835
)
836836
breeding_site_has_larvae = models.BooleanField(
837-
null=True,
837+
null=True, blank=True,
838838
help_text=_("Either if the user perceived larvaes the breeding site.")
839839
)
840840
# Object Manager

0 commit comments

Comments
 (0)