Skip to content
This repository was archived by the owner on Jul 24, 2018. It is now read-only.
This repository was 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

@fmontei

Description

@fmontei

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions