lduarte1991 / hxat

Contains the currently-in-development project by HarvardX to bring the annotation tool currently living in the edX platform to a more accessible LTI implementation.
13 stars 7 forks source link

Fixed issue with null target_external_options and annotation_database_search #31

Closed arthurian closed 8 years ago

arthurian commented 8 years ago

This fixes an issue that arises when the AssignmentTargets.target_external_options are null in the database. The issue came up when I deployed the code to our STAGE server (after running the migration). It looks like the field was set to null for the existing assignments, but the code assumed the value of the field would always be an empty string. I changed the code to use a getter method instead of retrieving the field directly, that way the logic for checking the field value and parsing it is in one place.

This also fixes an issue on image annotations that came up when the search query did not include a uri parameter (it was hard failing on the request.GET['uri'] line).

@lduarte1991 Thoughts?

lduarte1991 commented 8 years ago

Looks good to me!