Skip to content

jobdb needs method for updating tag values #1477

@mhasself

Description

@mhasself

... or otherwise storing user-specified information.

Job.tags gives you a copy of the tag info as a dict, so modifying that does nothing to the underlying record.

Minimum support would be something like this workaround:

def set_tag(job, key, new_val):
    for _t in job._tags:
        if _t.key == key:
            _t.value = new_val
            return
    else:
        raise ValueError(f'No tag called "{key}"')

Metadata

Metadata

Assignees

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