Skip to content

neomodel bug #4

Description

@Wenzel
        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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions