The code in question, since it's been lovingly omitted in the traceback from Zope, is:
permission = ArchivePermission.selectOneBy( archive=archive, person=person, sourcepackagename=sourcepackagename, permission=ArchivePermissionType.UPLOAD) Store.of(permission).remove(permission)
Store.of(None) returns None, so I suspect this is a race condition. Either way, if the selectOneBy returns None then it should just return as the permission was already deleted.
The code in question, since it's been lovingly omitted in the traceback from Zope, is:
permission = ArchivePermissi on.selectOneBy(
archive= archive, person=person,
sourcepack agename= sourcepackagena me,
permission =ArchivePermiss ionType. UPLOAD)
Store. of(permission) .remove( permission)
Store.of(None) returns None, so I suspect this is a race condition. Either way, if the selectOneBy returns None then it should just return as the permission was already deleted.