Skip to content

Commit

Permalink
Merge pull request #33 from rightx2/develop
Browse files Browse the repository at this point in the history
Check identifier type before decoding it
  • Loading branch information
fcurella committed Feb 21, 2017
2 parents 2d9d1f5 + 3f6bdfc commit e44eb00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recommends/converters.py
Expand Up @@ -41,7 +41,8 @@ def identifier_to_dict(self, identifier, score=None, related=False):
"""
The opposite of ``get_identifier()``
"""
identifier = identifier.decode('utf-8')
if type(identifier) is not str:
identifier = identifier.decode('utf-8')
app_module, site_id, object_id = identifier.split(':')
ctype = self.ctypes[app_module]

Expand Down

0 comments on commit e44eb00

Please sign in to comment.