Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Fix test run failures with double-registration on ICEkitURLField
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmurty committed Nov 24, 2016
1 parent a82f071 commit f2af85f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion icekit_events/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit f2af85f

Please sign in to comment.