mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 21:47:17 +02:00
Fixed the strange login error reported in issue103.
This commit is contained in:
parent
a2291953f2
commit
c4128e4656
2 changed files with 10 additions and 5 deletions
|
|
@ -88,8 +88,7 @@ def import_cmdset(python_path, cmdsetobj, emit_to_obj=None, no_logging=False):
|
|||
|
||||
try:
|
||||
try:
|
||||
wanted_cache_key = python_path
|
||||
print "inport cmdsets: cache=", CACHED_CMDSETS
|
||||
wanted_cache_key = python_path
|
||||
cmdsetclass = CACHED_CMDSETS.get(wanted_cache_key, None)
|
||||
errstring = ""
|
||||
if not cmdsetclass:
|
||||
|
|
|
|||
|
|
@ -33,9 +33,15 @@ def returns_player_list(method):
|
|||
try:
|
||||
players.append(user.get_profile())
|
||||
except Exception:
|
||||
print players
|
||||
print user, user.__class__
|
||||
logger.log_trace("User has no profile(), maybe database was partially reset?")
|
||||
# there is something wrong with get_profile. But
|
||||
# there is a 1-1 relation between Users-Players, so we
|
||||
# try to go the other way instead.
|
||||
from src.players.models import PlayerDB
|
||||
match = PlayerDB.objects.filter(user=user)
|
||||
if match:
|
||||
players.append(match[0])
|
||||
else:
|
||||
logger.log_trace("No connection User<->Player, maybe database was partially reset?")
|
||||
return players
|
||||
return func
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue