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 dynamic analysis specification listing error for empty excel columns (1.3.x) #1825

Merged
merged 3 commits into from Jul 8, 2021

Conversation

xispa
Copy link
Member

@xispa xispa commented Jul 8, 2021

Description of the issue/feature this PR addresses

This Pull Request ports #1820 to 1.3.x and also fixes a TypeError when creating a Dynamic Analysis Specification because of [#1803](#1803 Updated openpyxl to latest Python 2.x compatible version)

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 plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module plone.dexterity.browser.add, line 118, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 145, in update
  Module plone.app.z3cform.csrf, line 21, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.add, line 97, in handleAdd
  Module z3c.form.group, line 98, in extractData
  Module z3c.form.form, line 148, in extractData
  Module z3c.form.field, line 324, in extract
  Module z3c.form.field, line 216, in validate
  Module z3c.form.validator, line 201, in validate
  Module z3c.form.validator, line 206, in validateObject
  Module zope.interface.interface, line 590, in validateInvariants
  Module bika.lims.content.dynamic_analysisspec, line 69, in validate_sepecs_file
TypeError: 'generator' object has no attribute '__getitem__'

Desired behavior after PR is merged

No error

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

xispa added 3 commits July 8, 2021 18:10
```
ERROR Zope.SiteErrorLog 1625760797.610.228053622856 http://localhost:9090/senaite/bika_setup/dynamic_analysisspecs/++add++DynamicAnalysisSpec
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 plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module plone.dexterity.browser.add, line 118, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 145, in update
  Module plone.app.z3cform.csrf, line 21, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.add, line 97, in handleAdd
  Module z3c.form.group, line 98, in extractData
  Module z3c.form.form, line 148, in extractData
  Module z3c.form.field, line 324, in extract
  Module z3c.form.field, line 216, in validate
  Module z3c.form.validator, line 201, in validate
  Module z3c.form.validator, line 206, in validateObject
  Module zope.interface.interface, line 590, in validateInvariants
  Module bika.lims.content.dynamic_analysisspec, line 69, in validate_sepecs_file
TypeError: 'generator' object has no attribute '__getitem__'
```
@xispa xispa added Bug 🐞 Version 1.3 SENAITE Core Version 1.3.x labels Jul 8, 2021
@xispa xispa requested a review from ramonski July 8, 2021 16:31
@xispa xispa changed the title Fix dynamic analysis specification listing error for empty excel columns Fix dynamic analysis specification listing error for empty excel columns (1.3.x) Jul 8, 2021
@ramonski ramonski merged commit 34fb032 into 1.3.x Jul 8, 2021
@ramonski ramonski deleted the port-1820 branch July 8, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Version 1.3 SENAITE Core Version 1.3.x
Development

Successfully merging this pull request may close these issues.

None yet

2 participants