Update some direct model importing to use Django's apps.get_model instead.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db.models import get_model
|
||||
from django.apps import apps
|
||||
|
||||
|
||||
def launch_workflow(sender, instance, created, **kwargs):
|
||||
Workflow = get_model('document_states', 'Workflow')
|
||||
Workflow = apps.get_model(
|
||||
app_label='document_states', model_name='Workflow'
|
||||
)
|
||||
|
||||
if created:
|
||||
Workflow.objects.launch_for(instance)
|
||||
|
||||
Reference in New Issue
Block a user