mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 20:47:17 +02:00
Fixes web UI dropdown failure to refresh after character creation.
This commit is contained in:
parent
3e35a1ce5a
commit
7a22a4c0ec
1 changed files with 11 additions and 2 deletions
|
|
@ -190,9 +190,18 @@ class DefaultAccount(with_metaclass(TypeclassBase, AccountDB)):
|
|||
def sessions(self):
|
||||
return AccountSessionHandler(self)
|
||||
|
||||
@lazy_property
|
||||
# Do not make this a lazy property; the web UI will not refresh it!
|
||||
@property
|
||||
def characters(self):
|
||||
return self.db._playable_characters
|
||||
# Get playable characters list
|
||||
objs = self.db._playable_characters
|
||||
|
||||
# Rebuild the list if legacy code left null values after deletion
|
||||
if None in objs:
|
||||
objs = [x for x in self.db._playable_characters if x]
|
||||
self.db._playable_characters = objs
|
||||
|
||||
return objs
|
||||
|
||||
# session-related methods
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue