jazzband / django-fsm-log

Automatic logging for Django FSM
https://django-fsm-log.readthedocs.io/en/latest/
MIT License
241 stars 78 forks source link

feat: Log source state on transitions #37 #75

Closed jonasvp closed 6 years ago

jonasvp commented 6 years ago

This also renames state to target_state to make it more explicit. Using state still works except when filtering using the ORM.

codecov-io commented 6 years ago

Codecov Report

Merging #75 into master will increase coverage by 0.08%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   96.08%   96.17%   +0.08%     
==========================================
  Files          21       22       +1     
  Lines         460      470      +10     
==========================================
+ Hits          442      452      +10     
  Misses         18       18
Impacted Files Coverage Δ
django_fsm_log/backends.py 71.15% <ø> (ø) :arrow_up:
django_fsm_log/admin.py 100% <ø> (ø) :arrow_up:
django_fsm_log/migrations/0004_add_source_state.py 100% <100%> (ø)
tests/test_model.py 100% <100%> (ø) :arrow_up:
django_fsm_log/models.py 100% <100%> (ø) :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 d9d57d4...61cd993. Read the comment docs.

blueyed commented 6 years ago

This also renames state to target_state to make it more explicit.

I am inclined to leave this out, since it might break existing use cases unnecessarily (when using the ORM on it for example).

jonasvp commented 6 years ago

Ok, good point. I'll change the PR.

jonasvp commented 6 years ago

Yes, looks better - makes the patch more concise as well.

ticosax commented 6 years ago

@blueyed have you had a chance to test it ?

jonasvp commented 6 years ago

@blueyed Did you get a chance to have another look?