Add not empty containerBlockTypes condition 
Add not empty containerBlockTypes condition 

Made a sql error when I try to modify a block gallery when no type is specified. The not empty condition solved this issue.
grimpows/SonataPageBundle,Th3Mouk/SonataPageBundle,Dunduro/SonataPageBundle,grimpows/SonataPageBundle,Aylarius/SonataPageBundle,Th3Mouk/SonataPageBundle,sonata-project/SonataPageBundle,Dunduro/SonataPageBundle,Dunduro/SonataPageBundle,Aylarius/SonataPageBundle,sonata-project/SonataPageBundle,Dunduro/SonataPageBundle,grimpows/SonataPageBundle,Aylarius/SonataPageBundle,grimpows/SonataPageBundle,Aylarius/SonataPageBundle,Aylarius/SonataPageBundle,grimpows/SonataPageBundle,Th3Mouk/SonataPageBundle,Th3Mouk/SonataPageBundle,Dunduro/SonataPageBundle