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

In API make homepage and support_url go through outgoing url transform #4701

Merged
merged 2 commits into from Feb 17, 2017

Conversation

diox
Copy link
Member

@diox diox commented Feb 17, 2017

data.pop('theme_data')
if 'homepage' in self.fields:
data['homepage'] = self.outgoingify(data['homepage'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume there's no chance that a field can be in self.fields but not in data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should not happen, no, but maybe I should just do in data instead of in self.fields, I'll look into that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or data.get(...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would put the field in data if it was absent, which isn't ideal

@diox diox merged commit 73354eb into mozilla:master Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants