#1597 Backward-compatible fix for CG import
Merged 2 years ago by mikem. Opened 2 years ago by tkopecek.
tkopecek/koji issue1596  into  master

file modified
+4 -1
@@ -5861,7 +5861,10 @@ 

              extra = json.dumps(buildinfo['extra'])

          else:

              extra = None

-         owner = get_user(self.buildinfo['owner'], strict=True)['id']

+         if buildinfo.get('owner'):

should this be self.buildinfo.get('owner')?

+             owner = get_user(self.buildinfo['owner'], strict=True)['id']

+         else:

+             owner = context.session.user_id

          source = self.buildinfo.get('source')

          st_complete = koji.BUILD_STATES['COMPLETE']

          st_old = buildinfo['state']

User needn't to be specified during CG import. In such case actual user
should be the owner.

Fixes: https://pagure.io/koji/issue/1596

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

2 years ago

should this be self.buildinfo.get('owner')?

Commit 0d8a778 fixes this pull-request

Pull-Request has been merged by mikem

2 years ago