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 traceback in services listing in ARTemplate view #1583

Merged
merged 2 commits into from
May 14, 2020

Conversation

xispa
Copy link
Member

@xispa xispa commented May 13, 2020

Description of the issue/feature this PR addresses

Fixes a traceback in services listing from inside ARTemplate

Current behavior before PR

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module senaite.core.listing.view, line 214, in __call__
  Module senaite.core.listing.ajax, line 103, in handle_subpath
  Module senaite.core.listing.decorators, line 63, in wrapper
  Module senaite.core.listing.decorators, line 50, in wrapper
  Module senaite.core.listing.decorators, line 100, in wrapper
  Module senaite.core.listing.ajax, line 528, in ajax_folderitems
  Module senaite.core.listing.decorators, line 88, in wrapper
  Module senaite.core.listing.ajax, line 307, in get_folderitems
  Module bika.lims.browser.widgets.artemplateanalyseswidget, line 200, in
folderitems
  Module senaite.core.listing.view, line 895, in folderitems
  Module bika.lims.browser.widgets.artemplateanalyseswidget, line 233, in
folderitem
KeyError: 'required'

Desired behavior after PR is merged

No Traceback. Services are displayed correctly in the listing

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

```
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module senaite.core.listing.view, line 214, in __call__
  Module senaite.core.listing.ajax, line 103, in handle_subpath
  Module senaite.core.listing.decorators, line 63, in wrapper
  Module senaite.core.listing.decorators, line 50, in wrapper
  Module senaite.core.listing.decorators, line 100, in wrapper
  Module senaite.core.listing.ajax, line 528, in ajax_folderitems
  Module senaite.core.listing.decorators, line 88, in wrapper
  Module senaite.core.listing.ajax, line 307, in get_folderitems
  Module bika.lims.browser.widgets.artemplateanalyseswidget, line 200, in
folderitems
  Module senaite.core.listing.view, line 895, in folderitems
  Module bika.lims.browser.widgets.artemplateanalyseswidget, line 233, in
folderitem
KeyError: 'required'
```
@xispa xispa added the Bug 🐞 label May 13, 2020
@xispa xispa changed the title Fix traceback in analyses listing from ARTemplate view Fix traceback in services listing in ARTemplate view May 13, 2020
@xispa xispa requested a review from ramonski May 13, 2020 17:10
@ramonski ramonski merged commit 480dfa3 into master May 14, 2020
@ramonski ramonski deleted the artemplate-required-traceback branch May 14, 2020 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants