mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-17 19:59:29 +00:00
Return not found on error jsondoc
This commit is contained in:
@@ -40,6 +40,9 @@ class RedditAccount(models.Model):
|
|||||||
except:
|
except:
|
||||||
raise self.DoesNotExist
|
raise self.DoesNotExist
|
||||||
|
|
||||||
|
if 'error' in jsondoc:
|
||||||
|
raise self.DoesNotExist
|
||||||
|
|
||||||
data = jsondoc['data']
|
data = jsondoc['data']
|
||||||
|
|
||||||
self.link_karma = int(data['link_karma'])
|
self.link_karma = int(data['link_karma'])
|
||||||
|
|||||||
Reference in New Issue
Block a user