Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializer doesn't work in django 2 #78

Open
M1ha-Shvn opened this issue Jul 31, 2019 · 0 comments
Open

Serializer doesn't work in django 2 #78

M1ha-Shvn opened this issue Jul 31, 2019 · 0 comments

Comments

@M1ha-Shvn
Copy link

Hi.
rel attribute is deprecated in django 2.0. So serializer is broken.
Most probably rel should be replaced with remote_field attribute for Django 2.0 support.

  File "/home/vagrant/venv/lib/python3.7/site-packages/django_elasticsearch/managers.py", line 46, in wrapper
    return f(*args, **kwargs)
  File "/home/vagrant/venv/lib/python3.7/site-packages/django_elasticsearch/managers.py", line 104, in serialize
    return serializer.serialize(self.instance)
  File "/home/vagrant/venv/lib/python3.7/site-packages/django_elasticsearch/serializers.py", line 167, in serialize
    return json.dumps(self.format(instance),
  File "/home/vagrant/venv/lib/python3.7/site-packages/django_elasticsearch/serializers.py", line 154, in format
    for field in fields])
  File "/home/vagrant/venv/lib/python3.7/site-packages/django_elasticsearch/serializers.py", line 154, in <listcomp>
    for field in fields])
  File "/home/vagrant/venv/lib/python3.7/site-packages/django_elasticsearch/serializers.py", line 118, in serialize_field
    if field.rel:
AttributeError: 'IntegerField' object has no attribute 'rel'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant