Commit fc3fbeb1 by swdanielli

code clean

parent 15929164
...@@ -362,8 +362,6 @@ class RecommenderXBlock(XBlock): ...@@ -362,8 +362,6 @@ class RecommenderXBlock(XBlock):
# Return new vote # Return new vote
result['newVotes'] = (self.recommendations[resource_id]['upvotes'] - result['newVotes'] = (self.recommendations[resource_id]['upvotes'] -
self.recommendations[resource_id]['downvotes']) self.recommendations[resource_id]['downvotes'])
if 'newVotes' in result:
tracker.emit(data['event'], result) tracker.emit(data['event'], result)
return result return result
...@@ -522,7 +520,7 @@ class RecommenderXBlock(XBlock): ...@@ -522,7 +520,7 @@ class RecommenderXBlock(XBlock):
""" """
resource_id = stem_url(data['id']) resource_id = stem_url(data['id'])
if resource_id not in self.recommendations: if resource_id not in self.recommendations:
msg = 'The selected resource is not existing' msg = 'The selected resource does not exist'
self.error_handler(msg, 'edit_resource', resource_id) self.error_handler(msg, 'edit_resource', resource_id)
result = {} result = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment