Skip to content

Problem: Configure FPR commands and rules fail when using a dict with a single item list #290

@mamedin

Description

@mamedin

When the fpcommand and fprule dictionary has a single item list, for instance when disabling FITS:

archivematica_src_configure_fpcommand:
  FITS:
    enabled: '0'
    field_name: 'description'

archivematica_src_configure_fprule:
  c3b06895-ef9d-401e-8c51-ac585f955655: #Fits
    enabled: '0'
    field_name: 'uuid'

The role fails with:

TASK [artefactual.archivematica-qa-src : Configure fpcommand settings] *******************************************************************************************************************************
fatal: [am111bigserver]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: {'key': u'FITS', 'value': {u'field_name': u'description', u'enabled': u'0'}}. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."}

Metadata

Metadata

Assignees

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