# HG changeset patch
# User Thierry Florac <tflorac@ulthar.net>
# Date 1520644264 -3600
# Node ID b960e117634131e9d10bdc2060d0866341f9ca96
# Parent  b3656b8cbd7da9f081dbcf6309b224991d7d73df
Updated database upgrade code and removed INewLocalSite event subscriber

diff -r b3656b8cbd7d -r b960e1176341 src/pyams_media/site.py
--- a/src/pyams_media/site.py	Thu Mar 08 09:10:21 2018 +0100
+++ b/src/pyams_media/site.py	Sat Mar 10 02:11:04 2018 +0100
@@ -18,29 +18,21 @@
 # import interfaces
 from pyams_media.interfaces import IMediaConversionUtility, CONVERTER_NAME
 from pyams_utils.interfaces.site import ISiteGenerations
-from zope.site.interfaces import INewLocalSite
 
 # import packages
 from pyams_media.utility import MediaConversionUtility
 from pyams_utils.registry import utility_config
 from pyams_utils.site import check_required_utilities
-from pyramid.events import subscriber
 
 
 REQUIRED_UTILITIES = ((IMediaConversionUtility, '', MediaConversionUtility, CONVERTER_NAME), )
 
 
-@subscriber(INewLocalSite)
-def handle_new_local_site(event):
-    """Create a new conversion utility when a site is created"""
-    site = event.manager.__parent__
-    check_required_utilities(site, REQUIRED_UTILITIES)
-
-
 @utility_config(name='PyAMS medias converter', provides=ISiteGenerations)
 class MediaConversionGenerationsChecker(object):
     """Medias conversion utility generations checker"""
 
+    order = 80
     generation = 1
 
     def evolve(self, site, current=None):