Skip to content

Commit

Permalink
Merge branch 'fix/711-server-error-saving-proxy-models' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWillitts committed Oct 19, 2023
2 parents dca57e4 + 76f65a8 commit c50c171
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changes

unreleased
------
- fix Server error on saving StudyMedication and Adherence CRF proxy
models (#711)
- add Gunicorn and Nginx web config
- add project (static HTML) landing pages

Expand Down
18 changes: 17 additions & 1 deletion effect_subject/reference_model_configs.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
from edc_reference import site_reference_configs
from edc_reference import ReferenceModelConfig, site_reference_configs

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

# Register main Adherence model (only accessed via proxy models)
site_reference_configs.register(
reference_config=ReferenceModelConfig(
"effect_subject.adherence",
fields=["report_datetime"],
)
)

# Register main Study Medication model (only accessed via proxy models)
site_reference_configs.register(
reference_config=ReferenceModelConfig(
"effect_subject.studymedication",
fields=["report_datetime"],
)
)

site_reference_configs.add_fields_to_config(
name="effect_subject.signsandsymptoms",
fields=["xray_performed", "lp_performed", "urinary_lam_performed"],
Expand Down

0 comments on commit c50c171

Please sign in to comment.