From 0f234a16c16c3c226ce1806e4f4ffe589c408a26 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Tue, 10 Dec 2019 10:40:49 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20Fix=20checagem=20de=20autoria=20de?= =?UTF-8?q?=20Proposi=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/materia/views.py | 2 +- sapl/templates/materia/proposicao_detail.html | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 6c0b4abb5..33dac2f77 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -789,7 +789,7 @@ class ProposicaoCrud(Crud): p = Proposicao.objects.get(id=kwargs['pk']) msg_error = '' - if p and p.autor.user == user: + if p and p.autor == user.autoruser.autor: if action == 'send': if p.data_envio and p.data_recebimento: msg_error = _('Proposição já foi enviada e recebida.') diff --git a/sapl/templates/materia/proposicao_detail.html b/sapl/templates/materia/proposicao_detail.html index 487cc8600..58d2887b1 100644 --- a/sapl/templates/materia/proposicao_detail.html +++ b/sapl/templates/materia/proposicao_detail.html @@ -3,7 +3,7 @@ {% load tz %} {% block sub_actions %} {{block.super}} - {% if user == object.autor.user %} + {% if user.autoruser.autor == object.autor %}
{% if object.texto_articulado.exists %} {% trans "Texto Eletrônico" %} @@ -15,7 +15,7 @@ {% endif %} {% endblock sub_actions%} {% block editions %} - {% if user == object.autor.user %} + {% if user.autoruser.autor == object.autor %} {% if object.data_envio %} {% block editions_actions_return %}
@@ -39,7 +39,7 @@ {% endif %} {% endblock editions %} {% block detail_content %} - {% if user == object.autor.user %} + {% if user.autoruser.autor == object.autor %}

{% model_verbose_name 'sapl.materia.models.Proposicao' %}

@@ -89,7 +89,7 @@
-

{%field_verbose_name object 'descricao'%}

+

{% field_verbose_name object 'descricao' %}

{{object.descricao}}
@@ -100,7 +100,7 @@
-

{%field_verbose_name object 'observacao'%}

+

{% field_verbose_name object 'observacao' %}

{{object.observacao}}
@@ -155,7 +155,7 @@ {% if object.hash_code %}
-

{%field_verbose_name object 'hash_code'%}

+

{% field_verbose_name object 'hash_code' %}

{{object.hash_code}}