Ticket #1334 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

"AttributeError: 'NoneType' object has no attribute 'name'" exception when logging in

Reported by: amercader Owned by: amercader
Priority: major Milestone: ckan-sprint-2011-10-28
Component: ckan Keywords:
Cc: Repository: ckan
Theme: dictization

Description

On same cases this exception is thrown when logging in:

File '/home/adria/dev/envs/iati/src/ckan/ckan/controllers/user.py', line 252 in logged_in
  user_dict = get_action('user_show')(context,data_dict)
File '/home/adria/dev/envs/iati/src/ckan/ckan/logic/action/get.py', line 414 in user_show
  revision_dict = revision_show(context,{'id':revision.id})
File '/home/adria/dev/envs/iati/src/ckan/ckan/logic/action/get.py', line 332 in revision_show
  ref_package_by=ref_package_by)
File '/home/adria/dev/envs/iati/src/ckan/ckan/model/__init__.py', line 317 in revision_as_dict
  for pkg in revision.packages]
AttributeError: 'NoneType' object has no attribute 'name'

Change History

comment:1 Changed 3 years ago by dread

cset:b01de680bf86 copes with the problem. Now to find out why revision.packages has some None values - very odd!

comment:2 Changed 3 years ago by amercader

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 3 years ago by dread

I think this has been a problem since 1.3.3. Fixed in v1.5.

Note: See TracTickets for help on using tickets.