mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Resolve a syntax error when updating packages with no body. Fixes #1588
This commit is contained in:
parent
82d63804c1
commit
cc0cb83277
@ -1,7 +1,7 @@
|
||||
{% import 'macros/schemas/privilege.macros' as PRIVILEGE %}
|
||||
|
||||
{% if data %}
|
||||
{% if o_data.pkgbodysrc and data.pkgbodysrc == '' %}
|
||||
{% if data.pkgheadsrc is defined and data.pkgheadsrc != o_data.pkgheadsrc and o_data.pkgbodysrc != None %}
|
||||
DROP PACKAGE BODY {{ conn|qtIdent(data.schema,data.name) }};
|
||||
{% endif %}
|
||||
{% if data.pkgheadsrc %}
|
||||
@ -11,15 +11,6 @@ IS
|
||||
{{data.pkgheadsrc}}
|
||||
END {{ conn|qtIdent(data.name) }};
|
||||
|
||||
CREATE OR REPLACE PACKAGE BODY {{ conn|qtIdent(data.schema,data.name) }}
|
||||
IS
|
||||
{% if data.pkgbodysrc %}
|
||||
{{data.pkgbodysrc}}
|
||||
{% else %}
|
||||
{{o_data.pkgbodysrc}}
|
||||
{% endif %}
|
||||
END {{ conn|qtIdent(data.name) }};
|
||||
{% else %}
|
||||
{% if data.pkgbodysrc %}
|
||||
|
||||
CREATE OR REPLACE PACKAGE BODY {{ conn|qtIdent(data.schema,data.name) }}
|
||||
@ -27,7 +18,6 @@ IS
|
||||
{{data.pkgbodysrc}}
|
||||
END {{ conn|qtIdent(data.name) }};
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if data.pkgacl %}
|
||||
{% if 'deleted' in data.pkgacl %}
|
||||
{% for priv in data.pkgacl.deleted %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% import 'macros/schemas/privilege.macros' as PRIVILEGE %}
|
||||
|
||||
{% if data %}
|
||||
{% if o_data.pkgbodysrc and data.pkgbodysrc == '' %}
|
||||
{% if data.pkgheadsrc is defined and data.pkgheadsrc != o_data.pkgheadsrc and o_data.pkgbodysrc != None %}
|
||||
DROP PACKAGE BODY {{ conn|qtIdent(data.schema,data.name) }};
|
||||
{% endif %}
|
||||
{% if data.pkgheadsrc %}
|
||||
@ -11,15 +11,7 @@ IS
|
||||
{{data.pkgheadsrc}}
|
||||
END {{ conn|qtIdent(data.name) }};
|
||||
|
||||
CREATE OR REPLACE PACKAGE BODY {{ conn|qtIdent(data.schema,data.name) }}
|
||||
IS
|
||||
{% if data.pkgbodysrc %}
|
||||
{{data.pkgbodysrc}}
|
||||
{% else %}
|
||||
{{o_data.pkgbodysrc}}
|
||||
{% endif %}
|
||||
END {{ conn|qtIdent(data.name) }};
|
||||
{% else %}
|
||||
{% if data.pkgbodysrc %}
|
||||
|
||||
CREATE OR REPLACE PACKAGE BODY {{ conn|qtIdent(data.schema,data.name) }}
|
||||
@ -27,7 +19,6 @@ IS
|
||||
{{data.pkgbodysrc}}
|
||||
END {{ conn|qtIdent(data.name) }};
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if data.pkgacl %}
|
||||
{% if 'deleted' in data.pkgacl %}
|
||||
{% for priv in data.pkgacl.deleted %}
|
||||
|
Loading…
Reference in New Issue
Block a user