Fixed an issue in idmapper metaclass wrapper, it caused text fields to be occationally be written with objects.

This commit is contained in:
Griatch 2013-09-22 19:56:51 +02:00
parent bbba695380
commit 0a394929b7
7 changed files with 146 additions and 45 deletions

View file

@ -108,6 +108,8 @@ def field_pre_save(sender, instance=None, update_fields=None, raw=False, **kwarg
# try to see if there is a handler on object that should be triggered when saving.
handlername = "_at_%s_save" % fieldname
handler = _GA(instance, handlername) if handlername in _GA(instance, '__dict__') else None
#if handlername == "_at_db_location_save":
# print "handler:", handlername, handler, _GA(sender, '__dict__').keys()
if callable(handler):
#hid = hashid(instance, "-%s" % fieldname)
try: