senaite / senaite.core

Enterprise Open Source Laboratory System (LIMS)
https://senaite.com
GNU General Public License v2.0
254 stars 145 forks source link

Fix regression bug of #2510 #2511

Closed ramonski closed 8 months ago

ramonski commented 8 months ago

Description of the issue/feature this PR addresses

This PR fixes a regression that was introduced with #2510.

Current behavior before PR

Demo data import fails:

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.decorators, line 51, in decorator
  Module senaite.core.browser.form.ajax, line 174, in submit
  Module senaite.core.browser.form.ajax, line 184, in get_data
  Module json, line 339, in loads
  Module json.decoder, line 364, in decode
  Module json.decoder, line 382, in raw_decode
ValueError: No JSON object could be decoded

Desired behavior after PR is merged

Demo data can be imported

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