mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
* Add failing test for diffing polymorphic model instances. * Make diffing more robust for polymorphic models: When working with polymorphic models, where a child model inherits from a parent model, Django's pre_save signal may send model instances in a way where the log_update() handler receives an instance of the child as the `old` model, but an instance of the parent as the `new` model. This leads to a `FieldDoesNotExist` error when a field that only exists on the child was modified, and `get_field_value()` attempts look up that field on the parent. This change makes diffing polymorphic models more robust by considering this case in `get_default_value()`. Changes to those child fields won't be tracked in these cases, but at least `django-auditlog` won't prevent the model from being saved. |
||
|---|---|---|
| .. | ||
| custom_logentry_app | ||
| docker/db | ||
| test_app | ||
| __init__.py | ||
| admin.py | ||
| auditlog | ||
| docker-compose.yml | ||
| manage.py | ||
| middleware.py | ||
| test_commands.py | ||
| test_postgresql.py | ||
| test_render.py | ||
| test_settings.py | ||
| test_two_step_json_migration.py | ||
| test_use_json_for_changes.py | ||
| test_view.py | ||
| tests.py | ||