Skip to content

Commit 708fb0a

Browse files
committed
Set default value for ExpertReportAnnotation fields: tiger_certainty_notes and aegypti_certainty_category
1 parent a662a89 commit 708fb0a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tigacrafting/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,14 @@ def save(self, *args, **kwargs):
409409
if not kwargs.pop('skip_lastmodified', False):
410410
self.last_modified = timezone.now()
411411

412+
self.tiger_certainty_notes = -2
413+
if self.category.pk == 4: # albopictus
414+
self.tiger_certainty_notes = 2
415+
416+
self.aegypti_certainty_category = -2
417+
if self.category.pk == 5: # aegypti
418+
self.aegypti_certainty_category = 2
419+
412420
super(ExpertReportAnnotation, self).save(*args, **kwargs)
413421

414422

0 commit comments

Comments
 (0)