mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Use aiosqlite and add service for templates
This commit is contained in:
1 parent
d730c591b3
commit
0fea3f969e
14 files changed
+290
-230
No files matched your search
@@ -27,14 +27,14 @@ from sqlalchemy.ext.declarative import as_declarative
|
||||
@as_declarative()
|
||||
class Base:
|
||||
|
||||
def _asdict(self):
|
||||
def asdict(self):
|
||||
|
||||
return {c.key: getattr(self, c.key)
|
||||
for c in inspect(self).mapper.column_attrs}
|
||||
|
||||
def _asjson(self):
|
||||
def asjson(self):
|
||||
|
||||
return jsonable_encoder(self._asdict())
|
||||
return jsonable_encoder(self.asdict())
|
||||
|
||||
|
||||
class GUID(TypeDecorator):
|
||||
|
||||
Reference in new issue
Block a user