from django.core.management import BaseCommand

from custom.onse.tasks import update_facility_cases_from_dhis2_data_elements


class Command(BaseCommand):
    help = ('Update facility_supervision cases with indicators collected '
            'in DHIS2 over the last quarter.')

    def handle(self, *args, **options):
        update_facility_cases_from_dhis2_data_elements.apply(
            print_notifications=True)

from django.core.management import BaseCommand

from custom.onse.tasks import update_facility_cases_from_dhis2_data_elements


class Command(BaseCommand):
    help = ('Update facility_supervision cases with indicators collected '
            'in DHIS2 over the last quarter.')

    def handle(self, *args, **options):
        update_facility_cases_from_dhis2_data_elements.apply(kwargs={
            'print_notifications': True})

Fix passing keyword arg to task
Fix passing keyword arg to task

  from django.core.management import BaseCommand
  
  from custom.onse.tasks import update_facility_cases_from_dhis2_data_elements
  
  
  class Command(BaseCommand):
      help = ('Update facility_supervision cases with indicators collected '
              'in DHIS2 over the last quarter.')
  
      def handle(self, *args, **options):
-         update_facility_cases_from_dhis2_data_elements.apply(
+         update_facility_cases_from_dhis2_data_elements.apply(kwargs={
-             print_notifications=True)
+             'print_notifications': True})
  
Fix passing keyword arg to task
## Code Before:
from django.core.management import BaseCommand

from custom.onse.tasks import update_facility_cases_from_dhis2_data_elements


class Command(BaseCommand):
    help = ('Update facility_supervision cases with indicators collected '
            'in DHIS2 over the last quarter.')

    def handle(self, *args, **options):
        update_facility_cases_from_dhis2_data_elements.apply(
            print_notifications=True)

## Instruction:
Fix passing keyword arg to task
## Code After:
from django.core.management import BaseCommand

from custom.onse.tasks import update_facility_cases_from_dhis2_data_elements


class Command(BaseCommand):
    help = ('Update facility_supervision cases with indicators collected '
            'in DHIS2 over the last quarter.')

    def handle(self, *args, **options):
        update_facility_cases_from_dhis2_data_elements.apply(kwargs={
            'print_notifications': True})
