django-auditlog icon indicating copy to clipboard operation
django-auditlog copied to clipboard

make field value retrieval slightly more robust

Open euven opened this issue 5 years ago • 6 comments

when no field 'default' attribute is present

credit to: https://github.com/stherrien

Fixes #169

euven avatar Nov 27 '19 21:11 euven

Codecov Report

Merging #224 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   82.45%   82.45%           
=======================================
  Files          19       19           
  Lines         513      513           
=======================================
  Hits          423      423           
  Misses         90       90
Impacted Files Coverage Δ
src/auditlog/diff.py 85.29% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c3fedc4...2a75517. Read the comment docs.

codecov-io avatar Nov 27 '19 22:11 codecov-io

Codecov Report

Merging #224 into master will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   82.45%   82.45%           
=======================================
  Files          19       19           
  Lines         513      513           
=======================================
  Hits          423      423           
  Misses         90       90           
Impacted Files Coverage Δ
src/auditlog/diff.py 85.29% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2aecef2...2a75517. Read the comment docs.

codecov-commenter avatar Sep 13 '20 16:09 codecov-commenter

I can confirm that this issue still exists in master. forking and making this single line change has fixed the default onetoonerel error. If you'd like i can submit a new PR against current master. credit goes to bynare. https://github.com/mavericm1/django-auditlog

mavericm1 avatar Jun 10 '21 17:06 mavericm1

Hi @bynare. Thanks for your PR. Could you please rebase ? Thanks.

Linkid avatar Jan 04 '22 08:01 Linkid

Hi there -- issue remains and I confirm that @euven one line change PR resolves. Without it I cannot loaddata as OneToOneField does not have a default attribute. Please advise whether I should maintain a local fork or if this PR from will be merged soon. Thank you!

hairypalm avatar Aug 02 '22 17:08 hairypalm

Hi @hairypalm. Thanks for confirming that fix.

@euven Could you please:

  • Rebase your patch
  • Add a regression test
  • Add a change log entry to https://github.com/jazzband/django-auditlog/blob/master/CHANGELOG.md

@hairypalm it would be great if you could add a test function or code that helps us to add a test for it.

hramezani avatar Aug 02 '22 18:08 hramezani

Added in https://github.com/jazzband/django-auditlog/commit/a56d0e6f784f3d0e1107f41c8c7a3f2423686c14

hramezani avatar Sep 21 '22 06:09 hramezani