Skip to content

Remove usages of deprecated field.rel #245

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

Merged
merged 2 commits into from
Sep 1, 2017
Merged

Remove usages of deprecated field.rel #245

merged 2 commits into from
Sep 1, 2017

Conversation

edmorley
Copy link
Contributor

Since they were only required for Django <1.8 and cause the following deprecation warnings:

utils.py:61: RemovedInDjango20Warning: Usage of field.rel has been deprecated. Use field.remote_field instead.
    if hasattr(field, 'rel'):
utils.py:63: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead.
    return field.rel.to

Fixes #242.

Since they were only required for Django <1.8 and cause the following
deprecation warnings:

```
utils.py:61: RemovedInDjango20Warning: Usage of field.rel has been deprecated. Use field.remote_field instead.
    if hasattr(field, 'rel'):
utils.py:63: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead.
    return field.rel.to
```

Fixes #242.
@coveralls
Copy link

coveralls commented Aug 14, 2017

Coverage Status

Coverage decreased (-0.03%) to 92.324% when pulling b0df510 on edmorley:fix-deprecation-warnings into 2929d08 on graphql-python:master.

@coveralls
Copy link

coveralls commented Aug 30, 2017

Coverage Status

Coverage decreased (-0.03%) to 92.235% when pulling a4cc360 on edmorley:fix-deprecation-warnings into 6de94a7 on graphql-python:master.

@syrusakbary syrusakbary merged commit 992fbf0 into graphql-python:master Sep 1, 2017
@edmorley edmorley deleted the fix-deprecation-warnings branch September 1, 2017 09:41
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

Successfully merging this pull request may close these issues.

3 participants