AttributeError: 'NoneType' object has no attribute 'remove'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Benji York |
Bug Description
Traceback (most recent call last):
Module zope.publisher.
result = publication.
Module lazr.restful.
WebServiceP
Module canonical.
return mapply(ob, request.
Module zope.publisher.
return debug_call(obj, args)
- __traceback_info__: <security proxied lazr.restful.
Module zope.publisher.
return obj(*args)
Module lazr.restful.
raise e
AttributeError: 'NoneType' object has no attribute 'remove'
OOPS-2033A62 Page-id: Archive:
Related branches
- Brad Crittenden (community): Approve (code)
-
Diff: 90 lines (+29/-8)2 files modifiedlib/lp/soyuz/model/archivepermission.py (+13/-7)
lib/lp/soyuz/tests/test_archive.py (+16/-1)
Changed in launchpad: | |
assignee: | nobody → Benji York (benji) |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
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.