Skip to content

Conversation

frwickst
Copy link

The code is almost the same as @aemdy fix, https://github.com/aemdy/django-reversion-compare/commit/da60d7873bbd8fb212f7f076a68b0b52e297796e. Just a bit more nicely structured and with a proper commit message.

This should fix: #36

Note that there are other problems in the code base that will most likely cause a comparison to still fail, such as #41.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling ff1ac92 on frwickst:OneToOneField-fix into 1fe9d88 on jedie:master.

@jedie
Copy link
Owner

jedie commented Jun 18, 2015

This is general a not good tested code part.
See: https://coveralls.io/builds/2847195/source?filename=reversion_compare%2Fadmin.py#L172

Can you add unittests for this?!?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this line is not needed anymore, it should be deleted.

@frwickst frwickst force-pushed the OneToOneField-fix branch from ff1ac92 to 6daac59 Compare June 18, 2015 12:11
@frwickst
Copy link
Author

While writing the test I noticed that the problem was not actually having a OneToOne field, but a combination of a OneToOne field and having a custom related name on that field.

I modified the branch and added a failing test (that works after the fix).

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 6daac59 on frwickst:OneToOneField-fix into 1fe9d88 on jedie:master.

@frwickst frwickst changed the title One to one field fix One to one field custom related name fix Jun 18, 2015
@jedie
Copy link
Owner

jedie commented Jun 18, 2015

While writing the test I noticed that the problem was not actually having a OneToOne field...

Again a new confirmation for writing unittest 👍 ;)

@frwickst
Copy link
Author

Any plans on merging this? If you want I can rebase the branch on to the current master. I rebased it on the current master and added me to the authors.

Frank Wickström added 4 commits July 22, 2015 12:04
The identity model includes an id_number which is set to char field and
a  OneToOne field to a user. Note that the field also sets a custom related
name. This is to test that we can handle custom related names in one to
one fields.
…f all()

A OneToOne field does not have a all() function, which leads to an exception when
all() is called.
@frwickst frwickst force-pushed the OneToOneField-fix branch from 6daac59 to 7b093e3 Compare July 22, 2015 09:04
jedie added a commit that referenced this pull request Jul 22, 2015
One to one field custom related name fix
@jedie jedie merged commit 9145d83 into jedie:master Jul 22, 2015
@jedie
Copy link
Owner

jedie commented Jul 22, 2015

Thanks for the reminder!

@jedie
Copy link
Owner

jedie commented Jul 22, 2015

v0.5.4 release is out.

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.

Failure when inspecting reverse OneToOneFields

3 participants