Make Chart plugin compatible with db changes
This commit is contained in:
parent
fca9db7972
commit
f7c767c1c8
2 changed files with 6 additions and 8 deletions
|
@ -48,15 +48,15 @@ class ChartDb(Db):
|
|||
|
||||
def getTypeId(self, name):
|
||||
if name not in self.types:
|
||||
self.execute("INSERT INTO type ?", {"name": name})
|
||||
self.types[name] = self.cur.cursor.lastrowid
|
||||
res = self.execute("INSERT INTO type ?", {"name": name})
|
||||
self.types[name] = res.lastrowid
|
||||
|
||||
return self.types[name]
|
||||
|
||||
def getSiteId(self, address):
|
||||
if address not in self.sites:
|
||||
self.execute("INSERT INTO site ?", {"address": address})
|
||||
self.sites[address] = self.cur.cursor.lastrowid
|
||||
res = self.execute("INSERT INTO site ?", {"address": address})
|
||||
self.sites[address] = res.lastrowid
|
||||
|
||||
return self.sites[address]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue