Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError when DateOfBirth field is hidden in add sample #100

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Nov 29, 2023

Description of the issue/feature this PR addresses

This Pull Request fixes an error that arises on sample creation when the field DateOfBirth is disabled from the sample add form via "Manage Form Fields".

Current behavior before PR

Traceback (innermost last):
  Module ZServer.ZPublisher.Publish, line 144, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZServer.ZPublisher.Publish, line 44, in call_object
  Module bika.lims.decorators, line 51, in decorator
  Module bika.lims.browser.analysisrequest.add2, line 708, in __call__
  Module bika.lims.browser.analysisrequest.add2, line 1745, in ajax_submit
  Module senaite.patient.browser.widgets.agedob, line 64, in process_form
AttributeError: 'str' object has no attribute 'get'

Desired behavior after PR is merged

No traceback. The sample is created successfully

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa added the bug Something isn't working label Nov 29, 2023
@xispa xispa requested a review from ramonski November 29, 2023 14:28
@ramonski ramonski merged commit e51aeb5 into master Nov 29, 2023
2 checks passed
@ramonski ramonski deleted the error-patient-dob-missing branch November 29, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants