New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if a tag is not required and not present, don't check whether value in 'values' #13

Merged
merged 1 commit into from Nov 16, 2018

Conversation

Projects
None yet
2 participants
@kba
Contributor

kba commented Nov 15, 2018

A profile can mark a value as not required yet define an enumeration of values:

# [...]
Bag-Info:
  Enumerated-Tag:
    required: false
    default: "one"
    values: ["one", "two", "three"]

Currently, this raises a KeyError because the validator assumes that the presence of values implies required.

@ruebot

ruebot approved these changes Nov 16, 2018

@ruebot

This comment has been minimized.

Collaborator

ruebot commented Nov 16, 2018

Good catch!

@ruebot ruebot merged commit f7dcd61 into bagit-profiles:master Nov 16, 2018

5 checks passed

ci/circleci: build-python27 Your tests passed on CircleCI!
Details
ci/circleci: build-python34 Your tests passed on CircleCI!
Details
ci/circleci: build-python35 Your tests passed on CircleCI!
Details
ci/circleci: build-python36 Your tests passed on CircleCI!
Details
ci/circleci: build-python37 Your tests passed on CircleCI!
Details

@kba kba deleted the kba:not-required-values-check branch Nov 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment