File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
engine/schema/src/main/java/com/cloud/storage/dao Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ protected void init() {
170170 CountSnapshotsByAccount .select (null , Func .COUNT , null );
171171 CountSnapshotsByAccount .and ("account" , CountSnapshotsByAccount .entity ().getAccountId (), SearchCriteria .Op .EQ );
172172 CountSnapshotsByAccount .and ("status" , CountSnapshotsByAccount .entity ().getState (), SearchCriteria .Op .NIN );
173+ CountSnapshotsByAccount .and ("snapshotTypeNEQ" , CountSnapshotsByAccount .entity ().getSnapshotType (), SearchCriteria .Op .NIN );
173174 CountSnapshotsByAccount .and ("removed" , CountSnapshotsByAccount .entity ().getRemoved (), SearchCriteria .Op .NULL );
174175 CountSnapshotsByAccount .done ();
175176
@@ -220,6 +221,7 @@ public Long countSnapshotsForAccount(long accountId) {
220221 SearchCriteria <Long > sc = CountSnapshotsByAccount .create ();
221222 sc .setParameters ("account" , accountId );
222223 sc .setParameters ("status" , State .Error , State .Destroyed );
224+ sc .setParameters ("snapshotTypeNEQ" , Snapshot .Type .GROUP .ordinal ());
223225 return customSearch (sc , null ).get (0 );
224226 }
225227
You can’t perform that action at this time.
0 commit comments