From f2af85f7e9de7ca7494a849856a9274a5d969378 Mon Sep 17 00:00:00 2001 From: James Murty Date: Thu, 24 Nov 2016 14:10:45 +1100 Subject: [PATCH] Fix test run failures with double-registration on ICEkitURLField Use the new `ICEkitURLField.register_model_once` method available in django-icekit to safely register base events for `ICEkitURLField` without the risk that they will be re-registered (and therefore fail) because of the way the unit tests reload this app. --- icekit_events/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icekit_events/apps.py b/icekit_events/apps.py index e900bde..af04a0c 100644 --- a/icekit_events/apps.py +++ b/icekit_events/apps.py @@ -23,5 +23,5 @@ def ready(self): autodiscover_modules('event_type_plugins') from .models import EventBase - ICEkitURLField.register_model( + ICEkitURLField.register_model_once( EventBase, widget=SimpleRawIdWidget(EventBase), title='Event')