Skip to content

Commit

Permalink
Switch to output_validators for booleans
Browse files Browse the repository at this point in the history
- stop using `select_boolean` to hack the data back to being a boolean
  from a string
- instead use output_validators in order to transform the data from a
  string back to a boolean
See ckan#344 for more
  • Loading branch information
roc committed Oct 25, 2022
1 parent 02e7edf commit aa332f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ckanext/scheming/ckan_dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,26 @@ dataset_fields:
label: Has the standard been published?
help_text: Standards which have not yet been published will appear on the roadmap page
required: true
preset: select_boolean
preset: select
choices:
- value: false
label: "No"
- value: true
label: "Yes"
validators: boolean_validator
output_validators: boolean_validator

- field_name: mandated
label: Nationally Mandated
required: true
preset: select_boolean
preset: select
choices:
- value: false
label: "No"
- value: true
label: "Yes"
validators: boolean_validator
output_validators: boolean_validator

- field_name: status
label: Status of standard
Expand Down

0 comments on commit aa332f9

Please sign in to comment.