- # d = {c: getattr(self, c) for c in inspect(self).attrs.keys()}\r
- # if 'createtime' in d:\r
- # d['createtime'] = d['createtime'].isoformat()\r
- # if 'updatetime' in d:\r
- # d['updatetime'] = d['updatetime'].isoformat()\r
- # return d\r
- return {c: getattr(self, c) for c in inspect(self).attrs.keys()}\r
+ try:\r
+ # d = {c: getattr(self, c) for c in inspect(self).attrs.keys()}\r
+ # if 'createtime' in d:\r
+ # d['createtime'] = d['createtime'].isoformat()\r
+ # if 'updatetime' in d:\r
+ # d['updatetime'] = d['updatetime'].isoformat()\r
+ # return d\r
+ return {c: getattr(self, c) for c in inspect(self).attrs.keys()}\r
+ except NoInspectionAvailable:\r
+ return self.__dict__\r