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

[#2746] Simplify test for empty or missing value in markdown_extract #2747

Merged
merged 1 commit into from Nov 24, 2015
Merged

[#2746] Simplify test for empty or missing value in markdown_extract #2747

merged 1 commit into from Nov 24, 2015

Conversation

thriuin
Copy link
Contributor

@thriuin thriuin commented Nov 20, 2015

I recently encountered a case where the markdown_extract function was failing because of the empty value that was being passed in the notes field (we customizing heavily with scheming). The problem could be traced to this line:

if (text is None) or (text.strip() == ''):

This can be avoided by simplifying this test to:

if not text:

wardi added a commit that referenced this pull request Nov 24, 2015
[#2746] Simplify test for empty or missing value in markdown_extract
@wardi wardi merged commit 98f350a into ckan:master Nov 24, 2015
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.

None yet

2 participants