Commit 473ceabc authored by dj3c1t's avatar dj3c1t

fix SourceManager constructor

parent 29f57d1d
......@@ -24,8 +24,11 @@ class SourceManager {
public function __construct(Container $container) {
$this->container = $container;
$em = $this->container->get('doctrine')->getManager();
$im = $this->container->get('dj3c1t_app.install_manager');
try {
$this->sourceRepo = $em->getRepository("Dj3c1tSourceMLBundle:Source");
if($im->isInstalled()) {
$this->sourceRepo = $em->getRepository("Dj3c1tSourceMLBundle:Source");
}
}
catch (\Exception $e) {
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment