try:
plugin_run_node = commit.plugin.all()[0]
self.logger.info("Plugin run node already exists for commit %s", commit.hash)
except IndexError:
self.logger.info("Creating plugin run node for commit %s", commit.hash)
plugin_run_node = PluginRun()
# ensure connected
commit.plugin.connect(plugin_run_node)
# update plugin run datetime
plugin_run_node.filetype = datetime.now()
plugin_run_node.save()
this doesn't work
however
try:
plugin_run_node = commit.plugin.all()[0]
self.logger.info("Plugin run node already exists for commit %s", commit.hash)
except IndexError:
self.logger.info("Creating plugin run node for commit %s", commit.hash)
plugin_run_node = PluginRun()
plugin_run_node.save()
# ensure connected
commit.plugin.connect(plugin_run_node)
# update plugin run datetime
plugin_run_node.filetype = datetime.now()
with this the node is connected at least
this doesn't work
however
with this the node is connected at least