Skip to content

Commit

Permalink
Merge pull request #192 from gitaarik/master
Browse files Browse the repository at this point in the history
Django 1.11 compatibility, prevents AttributeError
  • Loading branch information
dmkoch authored Jun 1, 2017
2 parents a983874 + a9190f6 commit 1f2da34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonfield/subclassing.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, field):

def __get__(self, obj, type=None):
if obj is None:
raise AttributeError('Can only be accessed via an instance.')
return self
return obj.__dict__[self.field.name]

def __set__(self, obj, value):
Expand Down

0 comments on commit 1f2da34

Please sign in to comment.