Skip to content

Commit 5206770

Browse files
author
David Linko
committed
fixed 'None' has no attribute 'typeobj'
1 parent 911532e commit 5206770

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/camp/generators/data/agent.pgsql.jinja

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
{%- set params = [] -%}
55
{%- for param in obj.parameters.items -%}
66
{%- set count = count + 1 -%}
7-
{%- set params = params.append( param.typeobj.type_text~"."~param.name) -%}
7+
{%- set curr_param = ""-%}
8+
{%- if param.typeobj %}
9+
{%- set curr_param = param.typeobj.type_text -%}
10+
{%- endif %}
11+
{%- set params = params.append(curr_param~"."~param.name) -%}
812
{% endfor %}
913
CALL SP__insert_formal_parmspec( {{obj.parameters.items|length}}, 'formal parameters for {{obj.name | sql_name}}', '{{params|join(', ')}}',fp_spec_id);
1014
{%- endmacro %}
@@ -126,8 +130,11 @@ CALL SP__insert_const_actual_definition({{obj.name | sql_name}}_oid, '{{obj.desc
126130
{{gen_metadata(-3, obj)}}
127131
{% set result = "" %}
128132
{%- if obj.result is defined %}
133+
{% set result = obj.result.name %}
134+
{%- if obj.result.typeobj is defined %}
129135
{% set result = obj.result.typeobj.type_text ~ "." ~obj.result.name %}
130136
{%- endif %}
137+
{%- endif %}
131138
{%- if obj.parameters.items|length > 0 %}
132139
{{ gen_params(obj)}}
133140
CALL SP__insert_control_formal_definition({{obj.name | sql_name}}_oid, '{{obj.description | replace('\n', '')}}', fp_spec_id, '{{result}}', {{obj.name | sql_name}}_fid);
@@ -225,7 +232,6 @@ CALL SP__insert_tbr_actual_definition({{obj.name | sql_name}}_oid, {{obj.descrip
225232
{%-endif %}
226233
{%- set type = "NULL" %}
227234
{%- if obj.init_ari is defined %}
228-
{{obj.init_ari}}
229235
{%- if obj.init_ari.typeobj is defined %}
230236
{%- set type = obj.init_ari.typeobj %}
231237
{%-endif %}

0 commit comments

Comments
 (0)