diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2020-06-28 15:57:40 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2020-06-28 15:57:40 +0100 |
commit | 459ed11b58ae7c924b8b13a758b111bad7aa4d8d (patch) | |
tree | 1b3843be6fefee3ed9d404d06d9b1256b7144ce1 /utils.py | |
parent | bf1c683fd09ad9c984748e5abc18a610cca03ee1 (diff) | |
download | troggle-459ed11b58ae7c924b8b13a758b111bad7aa4d8d.tar.gz troggle-459ed11b58ae7c924b8b13a758b111bad7aa4d8d.tar.bz2 troggle-459ed11b58ae7c924b8b13a758b111bad7aa4d8d.zip |
avoiding problem in KH QMs import
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') |