As per the issue #189, creating an object that has both a JSONField and a GenericForeignKey raises the issue here, as per below:
File "/home/tom/django-jsonfield/env/lib/python3.6/site-packages/django/db/models/options.py", line 890, in _property_names
dir(self.model) if isinstance(getattr(self.model, attr), property)
File "/home/tom/django-jsonfield/env/lib/python3.6/site-packages/django/db/models/options.py", line 890, in <setcomp>
dir(self.model) if isinstance(getattr(self.model, attr), property)
File "/home/tom/django-jsonfield/jsonfield/subclassing.py", line 35, in __get__
raise AttributeError('Can only be accessed via an instance.')
AttributeError: Can only be accessed via an instance.
My PR duplicates the error, but I haven't figured out how to solve.
As per the issue #189, creating an object that has both a JSONField and a GenericForeignKey raises the issue here, as per below:
My PR duplicates the error, but I haven't figured out how to solve.