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 cannot create partitions from samples with Patient assigned #65

Merged
merged 2 commits into from
Mar 11, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Mar 11, 2023

Description of the issue/feature this PR addresses

This Pull Request makes it possible to create partitions from samples with a patient assigned

Current behavior before PR

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 176, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 385, in publish_module
  Module ZPublisher.WSGIPublisher, line 288, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module bika.lims.browser.partition_magic, line 98, in __call__
  Module bika.lims.utils.analysisrequest, line 427, in create_partition
  Module bika.lims.utils.analysisrequest, line 89, in create_analysisrequest
  Module Products.Archetypes.BaseObject, line 685, in processForm
  Module zope.event, line 33, in notify
  Module zope.component.event, line 27, in dispatch
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 448, in subscribers
  Module zope.interface.adapter, line 899, in subscribers
  Module zope.component.event, line 36, in objectEventNotify
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 448, in subscribers
  Module zope.interface.adapter, line 899, in subscribers
  Module senaite.patient, line 56, in wrapper
  Module senaite.patient.subscribers.analysisrequest, line 32, in on_object_created
  Module senaite.patient.subscribers.analysisrequest, line 94, in update_patient
  Module senaite.patient.api, line 97, in get_patient_by_mrn
AttributeError: 'dict' object has no attribute 'encode'

Desired behavior after PR is merged

Partitions are created and Patient is copied across

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

@xispa xispa requested a review from ramonski March 11, 2023 10:50
@xispa xispa added the bug Something isn't working label Mar 11, 2023
@ramonski ramonski merged commit d65af4e into master Mar 11, 2023
@ramonski ramonski deleted the fix-partition-creation branch March 11, 2023 11:28
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