Change deprecated import of get_model.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
from django.apps import apps
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from actstream import action
|
||||
@@ -23,7 +23,7 @@ class Event(object):
|
||||
self.__class__._labels[name] = label
|
||||
|
||||
def commit(self, actor=None, action_object=None, target=None):
|
||||
model = models.get_model('events', 'EventType')
|
||||
model = apps.get_model('events', 'EventType')
|
||||
|
||||
if not self.event_type:
|
||||
self.event_type, created = model.objects.get_or_create(name=self.name)
|
||||
|
||||
Reference in New Issue
Block a user