diff --git a/src/Site/SiteStorage.py b/src/Site/SiteStorage.py index 3c4c7b70..fd546913 100644 --- a/src/Site/SiteStorage.py +++ b/src/Site/SiteStorage.py @@ -44,11 +44,14 @@ class SiteStorage(object): raise Exception("Directory not exists: %s" % self.directory) def getDbFile(self): - if self.isFile("dbschema.json"): - schema = self.loadJson("dbschema.json") - return schema["db_file"] + if self.db: + return self.db.schema["db_file"] else: - return False + if self.isFile("dbschema.json"): + schema = self.loadJson("dbschema.json") + return schema["db_file"] + else: + return False # Create new databaseobject with the site's schema @util.Noparallel()