Improve REST API with filters
This commit is contained in:
parent
bc97eb1eb4
commit
417cd5da04
15 changed files with 78 additions and 36 deletions
|
|
@ -81,7 +81,7 @@ def save_object(sender, instance, **kwargs):
|
|||
model = instance.__class__
|
||||
fields = '__all__'
|
||||
|
||||
previous_json = JSONRenderer().render(CustomSerializer(previous).data).decode("UTF-8")
|
||||
previous_json = JSONRenderer().render(CustomSerializer(previous).data).decode("UTF-8") if previous else None
|
||||
instance_json = JSONRenderer().render(CustomSerializer(instance).data).decode("UTF-8")
|
||||
|
||||
if previous_json == instance_json:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue