diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -62,6 +62,10 @@ def save_carefully(objectType, lookupAttribs={}, nonLookupAttribs={}): print(" !! - -- instance.save()") print(" !! - lookupAttribs:{}\n !! - nonLookupAttribs:{}".format(lookupAttribs,nonLookupAttribs)) raise + try: + msg = str(instance) + except: + msg = "FAULT getting __str__ for instance with lookupattribs: {}:".format(lookupAttribs) if created: logging.info(str(instance) + ' was just added to the database for the first time. \n') |