Skip to content

Prevent django from throwing errors if url is None #75

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

Merged
merged 1 commit into from
Sep 15, 2015

Conversation

jsenecal
Copy link
Member

Also renders proper json null when id is None

@jsenecal jsenecal changed the title Prevent django from throwing errors is url is None Prevent django from throwing errors if url is None Sep 10, 2015
@jsenecal
Copy link
Member Author

The thing is that I think that encoding.force_text on None returns a string: 'None' while we want a json null

Also, calling extract_id_from_url(resource.get(field_name)) would dramatically fail if resource.get(field_name) would happen to be None

I'm trying to avoid both in that commit.

jerel added a commit that referenced this pull request Sep 15, 2015
Prevent django from throwing errors if url is None
@jerel jerel merged commit 3498201 into develop Sep 15, 2015
@jerel
Copy link
Member

jerel commented Sep 15, 2015

@jsenecal you are correct that force_text() returns 'None'. Thanks for clarifying

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