Catch the case of a prematurely deleted guest account. Resolves #1500.
This commit is contained in:
parent
7531e03064
commit
9d3d627e22
1 changed files with 2 additions and 0 deletions
|
|
@ -282,6 +282,8 @@ class AttributeHandler(object):
|
||||||
"attribute__db_attrtype": self._attrtype,
|
"attribute__db_attrtype": self._attrtype,
|
||||||
"attribute__db_key__iexact": key.lower(),
|
"attribute__db_key__iexact": key.lower(),
|
||||||
"attribute__db_category__iexact": category.lower() if category else None}
|
"attribute__db_category__iexact": category.lower() if category else None}
|
||||||
|
if not self.obj.pk:
|
||||||
|
return []
|
||||||
conn = getattr(self.obj, self._m2m_fieldname).through.objects.filter(**query)
|
conn = getattr(self.obj, self._m2m_fieldname).through.objects.filter(**query)
|
||||||
if conn:
|
if conn:
|
||||||
attr = conn[0].attribute
|
attr = conn[0].attribute
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue