Fix getting the active plugins for the project
Basically if the database object isn't instantiated the backref doesn't
work, so before checking if there is a relation between the project and
the plugin's table, instantiate the database object.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>