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

Provide helper to select location title from get_data response #294

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

kcloud
Copy link
Contributor

@kcloud kcloud commented Jul 5, 2023

Resolves #293. Modifies get_locations to include a helper providing the title field from ArchivesSpace API data.

@helrond
Copy link
Member

helrond commented Jul 5, 2023

@kcloud thanks, this looks good! I just did some linting and converted that first if statement to be a looser getattr check so if that setting isn't configured it will evaluate to False. I also added a default value of an empty list on the get inside each of those conditionals so we could get rid of the nested conditional check (if that makes sense, I feel like I am explaining it in a way that is more confusing than what I actually did).

For next time: you can run linting yourself by doing pre-commit run -a (you need to pip install pre-commit in your local virtual env first) or better yet, you can do pre-commit install in the root of the directory and then each time you commit those checks will run automatically.

@helrond helrond merged commit 17cfe64 into development Jul 5, 2023
@helrond helrond deleted the issue-293 branch July 5, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants