Skip to content

Accept instance of orm.Computer in prepare_pythonjob_inputs #80

Description

@ahkole

According to the type hints for prepare_pythonjob_inputs it should accept an instance of orm.Computer for the computer parameter, see

computer: Union[str, orm.Computer] = "localhost",
. However, if you try to pass a orm.Computer, the following exception is raised:

NotExistent: no Computer found with LABEL<some_computer (some_domain), pk: some_pk>: No result was found

I suspect the issue is here

computer = load_computer(computer)
because you cannot seem to pass an instance of orm.Computer to load_computer. Perhaps one should add a check that simply uses the passed computer if it's an instance of orm.Computer. If you want I could open a PR for this.

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

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions