Skip to content

Commit

Permalink
generic-import-admin-area-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Nov 6, 2024
1 parent f064427 commit 5081c4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/hct_mis_api/apps/household/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,9 @@ class CollectType(models.TextChoices):
org_name_enumerator = models.CharField(max_length=250, blank=True, default=BLANK)
village = models.CharField(max_length=250, blank=True, default=BLANK)
registration_method = models.CharField(max_length=250, choices=REGISTRATION_METHOD_CHOICES, default=BLANK)
collect_individual_data = models.CharField(max_length=250, choices=COLLECT_TYPES, default=COLLECT_TYPE_UNKNOWN)
collect_individual_data = models.CharField(
max_length=250, choices=COLLECT_TYPES, default=COLLECT_TYPE_UNKNOWN
) # TODO remove
currency = models.CharField(max_length=250, choices=CURRENCY_CHOICES, default=BLANK)
unhcr_id = models.CharField(max_length=250, blank=True, default=BLANK, db_index=True)
user_fields = JSONField(default=dict, blank=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from dateutil.relativedelta import relativedelta

from hct_mis_api.apps.household.models import (
COLLECT_TYPE_FULL,
COLLECT_TYPE_PARTIAL,
DISABLED,
FEMALE,
Expand Down Expand Up @@ -40,10 +39,7 @@ def recalculate_data(
) -> Tuple[Household, List[str]]:
household = Household.objects.select_for_update().get(id=household.id)

if (
household.collect_individual_data not in (COLLECT_TYPE_FULL, COLLECT_TYPE_PARTIAL)
and not household.program.data_collecting_type.recalculate_composition
):
if not household.program.data_collecting_type.recalculate_composition:
return household, []

individuals_to_update = []
Expand Down

0 comments on commit 5081c4a

Please sign in to comment.