mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 20:45:34 +08:00
update acl
This commit is contained in:
@@ -10,9 +10,9 @@ from api.lib.exception import CommitException
|
||||
|
||||
class FormatMixin(object):
|
||||
def to_dict(self):
|
||||
return dict([(k.name,
|
||||
getattr(self, k.name) if not isinstance(getattr(self, k.name), datetime.datetime) else getattr(
|
||||
self, k.name).strftime('%Y-%m-%d %H:%M:%S')) for k in getattr(self, "__table__").columns])
|
||||
return dict([(k.name, isinstance(getattr(self, k.name), datetime.datetime) and
|
||||
getattr(self, k.name).strftime('%Y-%m-%d %H:%M:%S')) or
|
||||
getattr(self, k.name) for k in getattr(self, "__table__").columns])
|
||||
|
||||
@classmethod
|
||||
def get_columns(cls):
|
||||
|
Reference in New Issue
Block a user