AttributeError: 'NoneType' object has no attribute 'remove'

Bug #820055 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Benji York

Bug Description

 Traceback (most recent call last):
  Module zope.publisher.publish, line 134, in publish
    result = publication.callObject(request, obj)
  Module lazr.restful.publisher, line 211, in callObject
    WebServicePublicationMixin, self).callObject(request, object)
  Module canonical.launchpad.webapp.publication, line 498, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  Module zope.publisher.publish, line 109, in mapply
    return debug_call(obj, args)
   - __traceback_info__: <security proxied lazr.restful._resource.EntryResource instance at 0x15d50610>
  Module zope.publisher.publish, line 115, in debug_call
    return obj(*args)
  Module lazr.restful._resource, line 943, in __call__
    raise e
AttributeError: 'NoneType' object has no attribute 'remove'

OOPS-2033A62 Page-id: Archive:EntryResource:deletePackageUploader

Tags: api oops qa-ok

Related branches

Revision history for this message
Julian Edwards (julian-edwards) wrote :

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.

tags: added: api
Benji York (benji)
Changed in launchpad:
assignee: nobody → Benji York (benji)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Benji York (benji)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.