fixed #3708
This commit is contained in:
parent
39da8f942f
commit
f1ab2b3afc
@ -289,10 +289,6 @@ class ProjectorViewSet(ModelViewSet):
|
|||||||
is not validated at this point! Should be done before.
|
is not validated at this point! Should be done before.
|
||||||
Returns the new serialized data.
|
Returns the new serialized data.
|
||||||
"""
|
"""
|
||||||
# reset scroll level
|
|
||||||
if (projector.scroll != 0):
|
|
||||||
projector.scroll = 0
|
|
||||||
projector.save()
|
|
||||||
projector_config = {}
|
projector_config = {}
|
||||||
for key, value in projector.config.items():
|
for key, value in projector.config.items():
|
||||||
if value.get('stable'):
|
if value.get('stable'):
|
||||||
@ -303,6 +299,10 @@ class ProjectorViewSet(ModelViewSet):
|
|||||||
serializer = self.get_serializer(projector, data={'config': projector_config}, partial=False)
|
serializer = self.get_serializer(projector, data={'config': projector_config}, partial=False)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
serializer.save()
|
serializer.save()
|
||||||
|
# reset scroll level
|
||||||
|
if (projector.scroll != 0):
|
||||||
|
projector.scroll = 0
|
||||||
|
projector.save()
|
||||||
return serializer.data
|
return serializer.data
|
||||||
|
|
||||||
@detail_route(methods=['post'])
|
@detail_route(methods=['post'])
|
||||||
|
Loading…
Reference in New Issue
Block a user