Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

parentSelector/labels must be provided even though document schema says otherwise #13

Open
fmontei opened this issue Dec 20, 2017 · 0 comments

Comments

@fmontei
Copy link
Contributor

fmontei commented Dec 20, 2017

The parentSelector property in $.metadata.layeringDefinition and labels property in $.metadata for a document throw an AttributeError error if not provided for rendered-documents endpoint:

Traceback (most recent call last):
  File "/opt/stack/deckhand/.tox/functional/local/lib/python2.7/site-packages/falcon/api.py", line 242, in __call__
    responder(req, resp, **params)
  File "./deckhand/policy.py", line 104, in handler
    return func(*args, **kwargs)
  File "./deckhand/control/common.py", line 88, in wrapper
    return func(self, req, *func_args, **func_kwargs)
  File "./deckhand/control/revision_documents.py", line 117, in on_get
    documents)
  File "./deckhand/engine/layering.py", line 156, in __init__
    self.layered_docs = self._calc_document_children()
  File "./deckhand/engine/layering.py", line 113, in _calc_document_children
    children = _get_children(doc)
  File "./deckhand/engine/layering.py", line 98, in _get_children
    parent_sel_key = list(parent_sel.keys())[0]
AttributeError: 'NoneType' object has no attribute 'keys'

This inconsistency should be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant