public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: PATCH: To fix the issue in Rules node (pgAdmin4)
Date: Tue, 13 Sep 2016 13:31:03 +0530
Message-ID: <CAKKotZQ_RcUYXvYWb_jyMAQthVMGqZLVDe0sQ=rseUqW+irGDw@mail.gmail.com> (raw)
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi,

PFA minor patch for rules node where it was throwing when user tries to
create new rule.
RM#1681

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [text/x-patch] RM_1681.patch (1.0K, 3-RM_1681.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/update.sql
index 099d6e4..2476823 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/update.sql
@@ -7,7 +7,7 @@
 {% if data.name and data.name != o_data.name %}
 ALTER RULE {{ conn|qtIdent(o_data.name) }} ON {{ conn|qtIdent(o_data.schema, o_data.view) }} RENAME TO {{ conn|qtIdent(data.name) }};{{ '\r\r' }}
 {% endif %}
-{% if data.event or data.do_instead or data.condition or data.statements %}
+{% if data.event or data.do_instead is defined or data.condition or data.statements %}
 CREATE OR REPLACE RULE {{ conn|qtIdent(rule_name) }} AS
     ON {% if data.event and data.event != o_data.event %}{{ data.event|upper }}{% else %}{{ o_data.event|upper }}{% endif %}
  TO {{ conn|qtIdent(o_data.schema, o_data.view) }}


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: PATCH: To fix the issue in Rules node (pgAdmin4)
  In-Reply-To: <CAKKotZQ_RcUYXvYWb_jyMAQthVMGqZLVDe0sQ=rseUqW+irGDw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox