Skip to content

Commit

Permalink
Merge branch 'release/0.3.60' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Oct 31, 2023
2 parents b8264a0 + f6045bd commit ceb1e09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
6 changes: 3 additions & 3 deletions edc_action_item/data_fixers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def fix_null_historical_action_identifier(app_label, models):
with connection.cursor() as cursor:
for model in models:
tbl = f"{app_label}_historical{model}"
if not re.match("([a-z]+)_historical_([a-z]+)", tbl):
raise ValueError("Invalid table name when building sql statement")
tbl = re.match("([a-z]+)_historical_([a-z]+)", tbl).group()
if not re.match("([a-z_]+)_historical([a-z]+)", tbl):
raise ValueError(f"Invalid table name when building sql statement. Got {tbl}")
tbl = re.match("([a-z_]+)_historical([a-z]+)", tbl).group()
sql = (
f"update {tbl} set action_identifier=id " # nosec B608
"where action_identifier is null" # nosec B608
Expand Down
11 changes: 0 additions & 11 deletions edc_action_item/tests/test_case_mixin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.test import TestCase
from edc_facility.import_holidays import import_holidays
from edc_metadata.tests.models import SubjectConsent
from edc_reference import ReferenceModelConfig, site_reference_configs
from edc_registration.models import RegisteredSubject
from edc_utils import get_utcnow
from edc_visit_schedule.site_visit_schedules import site_visit_schedules
Expand All @@ -18,20 +17,10 @@ def setUpTestData(cls):
def enroll(subject_identifier=None):
subject_identifier = subject_identifier or "1111111"

site_reference_configs.registry = {}
reference = ReferenceModelConfig(
name="edc_action_item.CrfLongitudinalOne", fields=["f1", "f2", "f3"]
)
site_reference_configs.register(reference)

site_visit_schedules._registry = {}
site_visit_schedules.loaded = False
site_visit_schedules.register(visit_schedule)

site_reference_configs.register_from_visit_schedule(
visit_models={"edc_appointment.appointment": "edc_visit_tracking.subjectvisit"}
)

subject_consent = SubjectConsent.objects.create(
subject_identifier=subject_identifier, consent_datetime=get_utcnow()
)
Expand Down
5 changes: 0 additions & 5 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
"django.contrib.sites",
"django_crypto_fields.apps.AppConfig",
"django_revision.apps.AppConfig",
# "rest_framework",
# "rest_framework.authtoken",
# "django_collect_offline.apps.AppConfig",
# "django_collect_offline_files.apps.AppConfig",
"simple_history",
"multisite",
"edc_auth.apps.AppConfig",
Expand All @@ -46,7 +42,6 @@
"edc_lab.apps.AppConfig",
"edc_navbar.apps.AppConfig",
"edc_offstudy.apps.AppConfig",
"edc_reference.apps.AppConfig",
"edc_metadata.apps.AppConfig",
"edc_protocol.apps.AppConfig",
"edc_identifier.apps.AppConfig",
Expand Down

0 comments on commit ceb1e09

Please sign in to comment.