Пример #1
0
 def response_deidentified_data(project, new_plan_version):
     """
     De-id exports will be hidden
     """
     from corehq.apps.export.dbaccessors import get_deid_export_count
     num_deid_reports = get_deid_export_count(project.name)
     if num_deid_reports > 0:
         return _fmt_alert(
             ungettext(
                 "You have %(num)d De-Identified Export. Selecting this "
                 "plan will remove it.",
                 "You have %(num)d De-Identified Exports. Selecting this "
                 "plan will remove them.", num_deid_reports) % {
                     'num': num_deid_reports,
                 })
Пример #2
0
 def response_deidentified_data(project, new_plan_version):
     """
     De-id exports will be hidden
     """
     from corehq.apps.export.dbaccessors import get_deid_export_count
     num_deid_reports = get_deid_export_count(project.name)
     if num_deid_reports > 0:
         return _fmt_alert(
             ungettext(
                 "You have %(num)d De-Identified Export. Selecting this "
                 "plan will remove it.",
                 "You have %(num)d De-Identified Exports. Selecting this "
                 "plan will remove them.",
                 num_deid_reports
             ) % {
                 'num': num_deid_reports,
             }
         )
 def test_get_count_deid_export_instances(self):
     self.assertEqual(get_deid_export_count(self.domain), 2)