#1303 fix history display for parallel host_channels updates
Merged 3 years ago by mikem. Opened 4 years ago by mikem.

file modified
+2 -2
@@ -4135,7 +4135,7 @@ 

          del x['.related']

          bad_edit = None

          if len(edit) != 1:

-             bad_edit = "%i elements" % len(edit)+1

+             bad_edit = "%i elements" % (len(edit)+1)

          other = edit[0]

          #check edit for sanity

          if create or not other[2]:
@@ -4342,7 +4342,7 @@ 

      'build_target_config' : ['build_target_id'],

      'external_repo_config' : ['external_repo_id'],

      'host_config': ['host_id'],

-     'host_channels': ['host_id'],

+     'host_channels': ['host_id', 'channel_id'],

      'tag_external_repos' : ['tag_id', 'external_repo_id'],

      'tag_listing' : ['build_id', 'tag_id'],

      'tag_packages' : ['package_id', 'tag_id'],

In the unlikely event that more than one host_channel entry is updated for the same host at the same event, the list-history command is confused and thinks it looks like a "bad edit". This happens because the code is indexing the changes incorrectly.

This change fixes the indexing and also fixes a bug in the code that tries to complain about the edit.

@tkopecek can you have a quick look?

Works for me, :thumbsup:

rebased onto 4bee4a5

3 years ago

Commit a5d5d0b fixes this pull-request

Pull-Request has been merged by mikem

3 years ago