#2375 cli: edit-tag --no-perm does not work as expected
Closed: Fixed 2 years ago by tkopecek. Opened 2 years ago by julian8628.

2020-07-16 03:48:57,828 [ERROR] koji: GenericError: invalid type for id lookup: <type 'NoneType'>

cli set perm_id=None for editTag2() call then it raise an error when looking up the "None" id.


In edit_tag we have:

if 'perm_id' in kwargs:
    kwargs['perm_id'] = get_perm_id(kwargs['perm_id'], strict=True)
elif 'perm' in kwargs:
    if kwargs['perm'] is None:
        kwargs['perm_id'] = None
    else:
        kwargs['perm_id'] = get_perm_id(kwargs['perm'], strict=True)

The edit-tag command is passing perm_id.

I suspect these parallel options come from the unification of editTag and editTag2 a while back. This looks like an easy fix. I don't see why both can't handle the None value, which would effectively make these parameters aliases of one another.

Metadata Update from @mikem:
- Custom field Size adjusted to None

2 years ago

Looks like this was introduced in #1945, so this affects 1.21 and 1.22

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.22.1 (was: 1.23)

2 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-done

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2409 Merged 2 years ago