edx-solutions/edx-platform — pull request #163 by mattdrayer (2014-08-07 03:28:19+00:00)
Title: mattdrayer/api-roles-opaque-keys: Fixed unhandled DoesNotExist exception

@chrisndodge @martynjames -- here's an initial attempt at a fix for ticket 1974 -- I've added support for converting a new-style id back to the old-style in the case of a failed lookup. Check out the test logic -- I'm creating a course that has no corresponding forum moderator role, which helped to trigger the error condition. I'm a little unsure of what to do if the secondary lookup for the forum role fails -- right now i"m just shrugging my shoulders and doing a 'pass'.