Fixed updates of the contentmanager. Not all command tests run yet.

This commit is contained in:
Griatch 2013-07-12 22:08:15 +02:00
parent 6bc16e46cc
commit 73a5800fbf
5 changed files with 36 additions and 25 deletions

View file

@ -98,7 +98,7 @@ class SharedMemoryModelBase(ModelBase):
"Wrapper for setting database field"
if hasattr(value, "dbobj"):
value = _GA(value, "dbobj")
elif fname.isdigit() or fname.startswith("#"):
elif isinstance(value, basestring) and (value.isdigit() or value.startswith("#")):
# we also allow setting using dbrefs, if so we try to load the matching object.
# (we assume the object is of the same type as the class holding the field, if
# not a custom handler must be used for that field)