mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 09:46:32 +01:00
Catch the case of a prematurely deleted guest account. Resolves #1500.
This commit is contained in:
parent
5817c1b790
commit
cbcb91f487
1 changed files with 2 additions and 0 deletions
|
|
@ -282,6 +282,8 @@ class AttributeHandler(object):
|
|||
"attribute__db_attrtype": self._attrtype,
|
||||
"attribute__db_key__iexact": key.lower(),
|
||||
"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)
|
||||
if conn:
|
||||
attr = conn[0].attribute
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue