Skip to content
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

Missing Boolean Casting for Institution Info #43

Open
ric-evans opened this issue Feb 8, 2022 · 2 comments
Open

Missing Boolean Casting for Institution Info #43

ric-evans opened this issue Feb 8, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ric-evans
Copy link
Member

ric-evans commented Feb 8, 2022

There looks to be a missing out-cast from the database on boolean fields. For example, this is from institutions.list_insts_flat:

 'Washington': {'abbreviation': 'UWa',
                'authorlist': 'false',
                'cite': 'University of Washington',
                'has_mou': 'false',
                'is_US': 'true',
                'name': 'University of Washington',
                'region': 'North America'},

I saw this issue when writing a filter_func and got "false" results for filter_func=lambda _, attrs: attrs.get('has_mou', False).

@ric-evans ric-evans added the bug Something isn't working label Feb 8, 2022
@dsschult
Copy link
Contributor

dsschult commented Feb 9, 2022

So currently the code doesn't do any casting, other than if something is a list. Note that you can't write a bool to keycloak either, you need to write strings.

I guess the code could do conversions internally, which would be a feature request.

@ric-evans ric-evans added enhancement New feature or request and removed bug Something isn't working labels Feb 9, 2022
@ric-evans
Copy link
Member Author

I'm fine with kicking this to the responsibility of the client since this isn't a bug. I'm not sure if this would affect anything outside of the mou dash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants