Simpler, faster, and more correct storage usage calculation.
This commit is contained in:
parent
f41b659850
commit
5a49506eee
|
@ -175,10 +175,9 @@ class User( Persistent ):
|
||||||
select
|
select
|
||||||
coalesce( sum( pg_column_size( note.* ) ), 0 )
|
coalesce( sum( pg_column_size( note.* ) ), 0 )
|
||||||
from
|
from
|
||||||
luminotes_user_current, user_notebook, note
|
user_notebook, note
|
||||||
where
|
where
|
||||||
luminotes_user_current.id = %s and
|
user_notebook.user_id = %s and
|
||||||
user_notebook.user_id = luminotes_user_current.id and
|
|
||||||
note.notebook_id = user_notebook.notebook_id;
|
note.notebook_id = user_notebook.notebook_id;
|
||||||
""" % quote( self.object_id )
|
""" % quote( self.object_id )
|
||||||
|
|
||||||
|
|
Reference in New Issue