#1255 always check existence of tag in setInheritanceData
Merged 3 years ago by mikem. Opened 4 years ago by tkopecek.
tkopecek/koji issue1252  into  master

file modified
+4 -3
@@ -697,6 +697,8 @@ 

                                      " parent_id(%i)" % parent_id)

          else:

              parent_ids.add(parent_id)

+         # check existence of parent

+         get_tag(parent_id, strict=True)

      # read current data and index

      data = dict([[link['parent_id'], link] for link in readInheritanceData(tag_id)])

      for link in changes:
@@ -10156,9 +10158,8 @@ 

                             apply the ones you submit here. If unspecified,

                             this defaults to False.

          """

-         if not isinstance(tag, six.integer_types):

-             #lookup tag id

-             tag = get_tag_id(tag, strict=True)

+         # verify existence of tag and/or convert name to id

+         tag = get_tag_id(tag, strict=True)

          context.session.assertPerm('admin')

          return writeInheritanceData(tag, data, clear=clear)

  

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

4 years ago

rebased onto 01f7aa0a7d72c114efc75761bd4129ab009b0f11

4 years ago

Added:
- check also existence of parents
- fix of long-standing typo check_fields - this was not problem, it only required more data than was needed.

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

4 years ago

Metadata Update from @julian8628:
- Pull-request untagged with: testing-done, testing-ready

3 years ago

@tkopecek Could you please rebase this PR. It conflicts PR #1434

rebased onto d9bf3c933f37aeda40caab62ce0239a9760b0a4f

3 years ago

rebased onto dd8a59f

3 years ago

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

3 years ago

Commit bcece35 fixes this pull-request

Pull-Request has been merged by mikem

3 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

3 years ago