diff --git a/corehq/apps/enterprise/enterprise.py b/corehq/apps/enterprise/enterprise.py index 2a7ce41df164..4204e74d4b42 100644 --- a/corehq/apps/enterprise/enterprise.py +++ b/corehq/apps/enterprise/enterprise.py @@ -1,27 +1,32 @@ import re from datetime import datetime, timedelta +from django.conf import settings from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy -from django.conf import settings from memoized import memoized -from corehq.apps.reports.util import get_commcare_version_and_date_from_last_usage from couchforms.analytics import get_last_form_submission_received from dimagi.utils.dates import DateSpan -from corehq.apps.builds.utils import get_latest_version_at_time, is_out_of_date -from corehq.apps.enterprise.exceptions import EnterpriseReportError, TooMuchRequestedDataError -from corehq.apps.enterprise.iterators import raise_after_max_elements from corehq.apps.accounting.models import BillingAccount from corehq.apps.accounting.utils import get_default_domain_url from corehq.apps.app_manager.dbaccessors import get_brief_apps_in_domain +from corehq.apps.builds.utils import get_latest_version_at_time, is_out_of_date from corehq.apps.domain.calculations import sms_in_last from corehq.apps.domain.models import Domain +from corehq.apps.enterprise.exceptions import ( + EnterpriseReportError, + TooMuchRequestedDataError, +) +from corehq.apps.enterprise.iterators import raise_after_max_elements from corehq.apps.es import forms as form_es from corehq.apps.es.users import UserES from corehq.apps.export.dbaccessors import ODataExportFetcher +from corehq.apps.reports.util import ( + get_commcare_version_and_date_from_last_usage, +) from corehq.apps.users.dbaccessors import ( get_all_user_rows, get_mobile_user_count, diff --git a/corehq/apps/reports/standard/deployments.py b/corehq/apps/reports/standard/deployments.py index 9ca7a05d4c48..07ad44c81cd1 100644 --- a/corehq/apps/reports/standard/deployments.py +++ b/corehq/apps/reports/standard/deployments.py @@ -12,8 +12,6 @@ from couchdbkit import ResourceNotFound from memoized import memoized -from corehq.apps.reports.filters.dates import SingleDateFilter -from corehq.util.dates import iso_string_to_date from couchexport.export import SCALAR_NEVER_WAS from dimagi.utils.dates import safe_strftime from dimagi.utils.parsing import string_to_utc_datetime @@ -35,6 +33,7 @@ from corehq.apps.locations.permissions import location_safe from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.exceptions import BadRequestError +from corehq.apps.reports.filters.dates import SingleDateFilter from corehq.apps.reports.filters.select import SelectApplicationFilter from corehq.apps.reports.filters.users import ExpandedMobileWorkerFilter from corehq.apps.reports.generic import ( @@ -53,6 +52,7 @@ from corehq.apps.users.models import CouchUser from corehq.apps.users.util import user_display_string from corehq.const import USER_DATE_FORMAT +from corehq.util.dates import iso_string_to_date from corehq.util.quickcache import quickcache