Merged the dev branch (many-chars-per-player) and made some more error checking in the migrations.
This commit is contained in:
parent
4854661889
commit
c843f15d42
2 changed files with 5 additions and 1 deletions
|
|
@ -366,12 +366,13 @@ class Migration(DataMigration):
|
||||||
mclass = CTYPEGET(model=data.db_model).model_class()
|
mclass = CTYPEGET(model=data.db_model).model_class()
|
||||||
try:
|
try:
|
||||||
return mclass.objects.get(id=data.id)
|
return mclass.objects.get(id=data.id)
|
||||||
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
try:
|
try:
|
||||||
return mclass.objects.get(id=data.id)
|
return mclass.objects.get(id=data.id)
|
||||||
except mclass.DoesNotExist: # could happen if object was deleted in the interim.
|
except mclass.DoesNotExist: # could happen if object was deleted in the interim.
|
||||||
return None
|
return None
|
||||||
|
except TypeError, e:
|
||||||
|
print e
|
||||||
|
|
||||||
def iter_id2db(item):
|
def iter_id2db(item):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -681,6 +681,9 @@ class TypedObject(SharedMemoryModel):
|
||||||
_SA(self, "_cached_typeclass", typeclass)
|
_SA(self, "_cached_typeclass", typeclass)
|
||||||
try:
|
try:
|
||||||
typeclass.at_init()
|
typeclass.at_init()
|
||||||
|
except AttributeError:
|
||||||
|
logger.log_trace("\n%s: Error initializing typeclass %s. Using default." % (self, tpath))
|
||||||
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.log_trace()
|
logger.log_trace()
|
||||||
return typeclass
|
return typeclass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue