Fix optional used bytes calculation

This commit is contained in:
shortcutme 2018-10-15 13:18:00 +02:00
parent 393c66385f
commit 3d82ad9222
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -269,9 +269,7 @@ class UiWebsocketPlugin(object):
back = {}
back["limit"] = config.optional_limit
back["used"] = self.site.content_manager.contents.db.execute(
"SELECT SUM(size) FROM file_optional WHERE is_downloaded = 1 AND is_pinned = 0"
).fetchone()[0]
back["used"] = self.site.content_manager.contents.db.getOptionalUsedBytes()
back["free"] = helper.getFreeSpace()
self.response(to, back)