From da8d410647c03cf48eca2b4e6a608d2b40409ff2 Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Mon, 26 Mar 2018 14:43:45 -0300 Subject: [PATCH] =?UTF-8?q?corrige=20atribui=C3=A7=C3=A3o=20de=20n=C3=B3?= =?UTF-8?q?=20raiz=20de=20dispositivos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/compilacao/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapl/compilacao/models.py b/sapl/compilacao/models.py index ac1939f80..f677cf97a 100644 --- a/sapl/compilacao/models.py +++ b/sapl/compilacao/models.py @@ -1086,6 +1086,9 @@ class Dispositivo(BaseModel, TimestampedMixin): update_fields=None, clean=True): self.dispositivo_raiz = self.get_raiz() + if self.dispositivo_raiz == self: + self.dispositivo_raiz = None + self.contagem_continua = self.tipo_dispositivo.contagem_continua return super().save(