Work around a page breakage with open_an_issue.

Review Request #4193 — Created June 1, 2013 and submitted — Latest diff uploaded


Review Board


Work around a page breakage with open_an_issue.

Some users have hit an odd problem where the open_an_issue profile field
was returning None. This indicates possibly that there was an error
fetching the field.

The only thing I can think of is that 'user', in this case, doesn't mean
what we think it means. Really, we should be using request.user and not
user anyway. It's been changed to use that. It's also now using a
conditional to output true/false instead of the hacky call to lower().
Reproduced the problem by replacing 'get_profile' with 'get_profile2' in the
template. With lower(), the result is blank, causing a JavaScript error.
With the conditional, I at least get false.