Skip to content

Commit

Permalink
Merge branch 'release/0.3.19' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 29, 2024
2 parents e9c9b2a + 58a2660 commit 9a78df3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion edc_label/navbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

label = Navbar(name="edc_label")

label.append_item(
label.register(
NavbarItem(
name="label",
label="Label",
Expand Down
4 changes: 2 additions & 2 deletions edc_label/subject_label.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional

from django.apps import apps as django_apps
from edc_protocol import Protocol
from edc_protocol.research_protocol_config import ResearchProtocolConfig

from .label import Label

Expand Down Expand Up @@ -35,7 +35,7 @@ def registered_subject(self):
@property
def label_context(self) -> dict:
context = {
"protocol": Protocol().protocol,
"protocol": ResearchProtocolConfig().protocol,
"subject_identifier": self.registered_subject.subject_identifier,
"gender": self.registered_subject.gender,
"dob": self.registered_subject.dob,
Expand Down
22 changes: 19 additions & 3 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import django
from django.conf import settings
from django.test.runner import DiscoverRunner
from edc_constants.constants import IGNORE
from edc_test_utils import DefaultTestSettings

app_name = "edc_label"
Expand All @@ -18,8 +17,15 @@
BASE_DIR=base_dir,
APP_NAME=app_name,
ETC_DIR=os.path.join(base_dir, app_name, "tests", "etc"),
SUBJECT_VISIT_MODEL="edc_lab.subjectvisit",
EDC_NAVBAR_VERIFY_ON_LOAD=IGNORE,
SILENCED_SYSTEM_CHECKS=[
"sites.E101",
"edc_navbar.E002",
"edc_navbar.E003",
"edc_consent.E001",
"edc_sites.E001",
"edc_sites.E002",
],
SUBJECT_VISIT_MODEL="edc_visit_tracking.subjectvisit",
EDC_AUTH_SKIP_SITE_AUTHS=True,
EDC_AUTH_SKIP_AUTH_UPDATER=True,
INSTALLED_APPS=[
Expand All @@ -31,11 +37,21 @@
"django.contrib.staticfiles",
"django.contrib.sites",
"django_crypto_fields.apps.AppConfig",
"edc_appointment.apps.AppConfig",
"edc_auth.apps.AppConfig",
"edc_lab.apps.AppConfig",
"edc_action_item.apps.AppConfig",
"edc_metadata.apps.AppConfig",
"edc_registration.apps.AppConfig",
"edc_identifier.apps.AppConfig",
"edc_visit_schedule.apps.AppConfig",
"edc_data_manager.apps.AppConfig",
"edc_form_runners.apps.AppConfig",
"edc_visit_tracking.apps.AppConfig",
"edc_notification.apps.AppConfig",
"edc_sites.apps.AppConfig",
"edc_label.apps.AppConfig",
"edc_appconfig.apps.AppConfig",
],
add_dashboard_middleware=True,
).settings
Expand Down

0 comments on commit 9a78df3

Please sign in to comment.