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

Use .pk instead of .id when referring to related object. #110

Merged
merged 1 commit into from
Jan 4, 2019
Merged

Use .pk instead of .id when referring to related object. #110

merged 1 commit into from
Jan 4, 2019

Conversation

peterlisak
Copy link
Contributor

In case of relation to model with primary key which is named differently as id, it is raising the following error when comparing revisions.

'ModelName' object has no attribute 'id'
../site-packages/reversion_compare/compare.py in <setcomp>, line 130

.pk should be used.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 84.283% when pulling f96f972 on peterlisak:bug-id into a304297 on jedie:master.

@jedie
Copy link
Owner

jedie commented Jan 4, 2019

That sounds very reasonable.
Thanks for contribution!

@jedie jedie merged commit bb68825 into jedie:master Jan 4, 2019
@jedie
Copy link
Owner

jedie commented Jan 4, 2019

@peterlisak it's released as v0.8.6 ;)

@peterlisak
Copy link
Contributor Author

@jedie Cool, thanks!

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