File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -174,16 +174,21 @@ def check_date_within_study_period(self) -> None:
174
174
protocol = ResearchProtocolConfig ()
175
175
study_open_datetime = protocol .study_open_datetime
176
176
study_close_datetime = protocol .study_close_datetime
177
- for index , attr in enumerate ( ["start" , "end" ]) :
177
+ for attr in ["start" , "end" ]:
178
178
if not (
179
179
floor_secs (study_open_datetime )
180
180
<= getattr (self , attr )
181
181
<= ceil_secs (study_close_datetime )
182
182
):
183
- date_string = formatted_datetime (getattr (self , attr ))
183
+ open_date_string = formatted_datetime (study_open_datetime )
184
+ close_date_string = formatted_datetime (study_close_datetime )
185
+ attr_date_string = formatted_datetime (getattr (self , attr ))
184
186
raise ConsentDefinitionError (
185
- f"Invalid { attr } date. Cannot be before study start date. "
186
- f"See { self } . Got { date_string } ."
187
+ f"Invalid { attr } date. "
188
+ f"Must be within the opening and closing dates of the protocol. "
189
+ f"See { self } . "
190
+ f"Got { open_date_string = } , { close_date_string = } , "
191
+ f"{ attr = } , { attr_date_string = } ."
187
192
)
188
193
189
194
def get_previous_consent (
You can’t perform that action at this time.
0 commit comments