Sote site in contentdb after files loaded
This commit is contained in:
parent
c35ffccf6c
commit
12bf5bb152
2 changed files with 5 additions and 0 deletions
|
@ -58,6 +58,10 @@ class ContentDb(Db):
|
|||
}
|
||||
|
||||
return schema
|
||||
|
||||
def initSite(self, site):
|
||||
self.sites[site.address] = site
|
||||
|
||||
for row in self.execute("SELECT * FROM site"):
|
||||
self.site_ids[row["address"]] = row["site_id"]
|
||||
return self.site_ids[site_address]
|
||||
|
|
|
@ -38,6 +38,7 @@ class ContentManager(object):
|
|||
elif self.contents.get("content.json") and self.getOptionalSize() > 0:
|
||||
self.site.storage.updateBadFiles() # No hashfield cache created yet
|
||||
self.has_optional_files = True
|
||||
self.contents.db.initSite(self.site)
|
||||
|
||||
# Load content.json to self.content
|
||||
# Return: Changed files ["index.html", "data/messages.json"], Deleted files ["old.jpg"]
|
||||
|
|
Loading…
Reference in a new issue