mirror of https://gitlab.crans.org/bde/nk20
Update JSON
This commit is contained in:
parent
2f51057f4c
commit
12ddfad254
|
@ -60,9 +60,8 @@ def save_object(sender, instance, **kwargs):
|
||||||
|
|
||||||
user, ip = get_user_and_ip(sender)
|
user, ip = get_user_and_ip(sender)
|
||||||
|
|
||||||
from rest_framework.renderers import JSONRenderer
|
previous_json = serializers.serialize('json', previous)[1:-1] if previous.exists else None
|
||||||
previous_json = JSONRenderer().render(previous)
|
instance_json = serializers.serialize('json', [instance, ])[1:-1]
|
||||||
instance_json = JSONRenderer().render(instance)
|
|
||||||
Changelog.objects.create(user=user,
|
Changelog.objects.create(user=user,
|
||||||
ip=ip,
|
ip=ip,
|
||||||
model=ContentType.objects.get_for_model(instance),
|
model=ContentType.objects.get_for_model(instance),
|
||||||
|
|
Loading…
Reference in New Issue