aschn / drf-tracking

Utils to track requests to Django Rest Framework API views
http://drf-tracking.readthedocs.org/
ISC License
366 stars 95 forks source link

fix(): when cleaning the data for logging, do not change the original… #63

Closed gbataille closed 7 years ago

gbataille commented 7 years ago

… data

This could cause problem in tests where the test framework has already populated request.data with a dict

gbataille commented 7 years ago

ok so it's not a test problem, it does not work in "production" either.

Not only does the db record gets mangled, the actual payload that is passed to DRF is broken too. I'll see to add tests and I'll discuss it with Tom (he is back from vacation on Monday)

avelis commented 7 years ago

@gbataille I appreciate the update. Keep me posted if you can and I am merge accordingly.

triat commented 7 years ago

I'll actually will refactor the clean_data function, I will put this fix in the other PR and fix the tests