Skip to content

Commit

Permalink
g.gui.gmodeler: fix script export not working if model contains Model…
Browse files Browse the repository at this point in the history
…Data-type item (#3209)
  • Loading branch information
pesekon2 committed Nov 2, 2023
1 parent 58a1576 commit fd16a6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gui/wxpython/gmodeler/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2731,7 +2731,7 @@ def _handler(request, response):"""

self._writeHandler()

for item in self.model.GetItems():
for item in self.model.GetItems(ModelAction):
if item.GetParameterizedParams()["flags"]:
self.fd.write(
r"""
Expand Down Expand Up @@ -2864,7 +2864,7 @@ def _write_input_output_object(
)

def _writeHandler(self):
for item in self.model.GetItems():
for item in self.model.GetItems(ModelAction):
self._writeItem(item, variables=item.GetParameterizedParams())

self.fd.write("\n{}return response\n".format(" " * self.indent))
Expand Down Expand Up @@ -3132,7 +3132,7 @@ def _writePython(self):
)
)

modelItems = self.model.GetItems()
modelItems = self.model.GetItems(ModelAction)
for item in modelItems:
for flag in item.GetParameterizedParams()["flags"]:
if flag["label"]:
Expand Down Expand Up @@ -3228,7 +3228,7 @@ def cleanup():
self.fd.write(" pass\n")

self.fd.write("\ndef main(options, flags):\n")
for item in self.model.GetItems():
for item in self.model.GetItems(ModelAction):
self._writeItem(item, variables=item.GetParameterizedParams())

self.fd.write(" return 0\n")
Expand Down

0 comments on commit fd16a6e

Please sign in to comment.