Fixes bug around unset absolute ids

This commit is contained in:
Mouse Reeve 2020-03-28 18:20:59 -07:00
parent 380e49712d
commit db6af61f03

View file

@ -114,6 +114,8 @@ def get_favorite(absolute_id):
def get_by_absolute_id(absolute_id, model):
''' generalized function to get from a model with a remote_id field '''
# check if it's a remote status
if not absolute_id:
return None
try:
return model.objects.get(remote_id=absolute_id)
except model.DoesNotExist: