mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-04-01 22:20:31 +00:00
Fix change handler for objects updated using F expressions.
This commit is contained in:
parent
ea440356a3
commit
bd830a4aab
1 changed files with 3 additions and 1 deletions
|
|
@ -346,7 +346,9 @@ class Collection(APIMixin):
|
|||
if exps:
|
||||
# clone/update obj with values but only for the expression fields
|
||||
obj = deepcopy(obj)
|
||||
for name, val in self.model.objects.values(*exps).get(pk=obj.pk):
|
||||
for name, val in self.model.objects.values(*exps).get(
|
||||
pk=obj.pk,
|
||||
).items():
|
||||
setattr(obj, name, val)
|
||||
|
||||
# run serialization now all fields are "concrete" (not F expressions)
|
||||
|
|
|
|||
Loading…
Reference in a new issue