You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create an analysisspec by JSONAPI with ResultsRange field by jsonapi,
POST Method, data =
{
"title": "spec_name",
"description": "desc. of analysisspec",
"ResultsRange": [
feedback message " 'NoneType' object has no attribute 'get' "
but when the data remove the "ResultsRange", the create is success.
<>
Expected behaviour
could create analysisspec by JSONAPI and set "ResultsRange" field at the same time.
<>
Versions
OS: Linux
senaite.core: master
senaite.impress: master
senaite.core.listing: master
senaite.core.supermodel: master
Traceback
Traceback (most recent call last):
File "/home/senaite/buildout-cache/eggs/cp27mu/plone.jsonapi.core-0.7.0-py2.7.egg/plone/jsonapi/core/browser/decorators.py", line 23, in decorator
return f(*args, **kwargs)
File "/home/senaite/buildout-cache/eggs/cp27mu/plone.jsonapi.core-0.7.0-py2.7.egg/plone/jsonapi/core/browser/api.py", line 57, in to_json
return self.dispatch()
File "/home/senaite/buildout-cache/eggs/cp27mu/plone.jsonapi.core-0.7.0-py2.7.egg/plone/jsonapi/core/browser/api.py", line 51, in dispatch
return router(self.context, self.request, path)
File "/home/senaite/buildout-cache/eggs/cp27mu/plone.jsonapi.core-0.7.0-py2.7.egg/plone/jsonapi/core/browser/router.py", line 150, in __call__
return self.view_functions[endpoint](context, request, **values)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.jsonapi-2.4.0-py2.7.egg/senaite/jsonapi/v1/routes/content.py", line 105, in action
items = action_func(portal_type=portal_type, uid=uid)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.jsonapi-2.4.0-py2.7.egg/senaite/jsonapi/api.py", line 158, in create_items
obj = create_object(container, portal_type, **record)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.jsonapi-2.4.0-py2.7.egg/senaite/jsonapi/api.py", line 1419, in create_object
update_object_with_data(obj, data)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.jsonapi-2.4.0-py2.7.egg/senaite/jsonapi/api.py", line 1495, in update_object_with_data
invalid = validate_object(content, record)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.jsonapi-2.4.0-py2.7.egg/senaite/jsonapi/api.py", line 1524, in validate_object
return obj.validate(data=data)
File "/home/senaite/buildout-cache/eggs/cp27mu/Products.Archetypes-1.16.6-py2.7.egg/Products/Archetypes/BaseObject.py", line 517, in validate
errors=errors, data=data, metadata=metadata)
File "/home/senaite/buildout-cache/eggs/cp27mu/Products.Archetypes-1.16.6-py2.7.egg/Products/Archetypes/Schema/__init__.py", line 629, in validate
REQUEST=REQUEST)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/senaite/core/browser/fields/records.py", line 173, in validate
), None)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/senaite/core/browser/fields/records.py", line 169, in <genexpr>
result
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/senaite/core/browser/fields/records.py", line 165, in <genexpr>
for record
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/senaite/core/browser/fields/record.py", line 390, in validate
res = self.validate_validators(value, instance, errors, **kwargs)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/senaite/core/browser/fields/record.py", line 407, in validate_validators
**kwargs
File "/home/senaite/buildout-cache/eggs/cp27mu/Products.validation-2.1.3-py2.7.egg/Products/validation/chain.py", line 137, in __call__
result = validator(value, *args, **kwargs)
File "/home/senaite/buildout-cache/eggs/cp27mu/senaite.core-2.4.1-py2.7.egg/bika/lims/validators.py", line 845, in __call__
service_uids = request.get("uids", [])
AttributeError: 'NoneType' object has no attribute 'get'
<<BACKTRACE IF RELEVANT>>
Screenshot
The text was updated successfully, but these errors were encountered:
Description
create an analysisspec by JSONAPI with ResultsRange field by jsonapi,
POST Method, data =
{
"title": "spec_name",
"description": "desc. of analysisspec",
"ResultsRange": [
}
the create cannot success.
<>
Reproduction guide
<>
Observed behaviour
feedback message " 'NoneType' object has no attribute 'get' "
but when the data remove the "ResultsRange", the create is success.
<>
Expected behaviour
could create analysisspec by JSONAPI and set "ResultsRange" field at the same time.
<>
Versions
OS: Linux
senaite.core:
master
senaite.impress:
master
senaite.core.listing:
master
senaite.core.supermodel:
master
Traceback
Screenshot
The text was updated successfully, but these errors were encountered: