Fix an issue with the Activity Stream where we weren't performing the right type conversion to track object types

This commit is contained in:
Matthew Jones
2013-11-08 11:08:11 -05:00
parent b7b22fa7f8
commit 710b01c333
4 changed files with 11 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.db.models.signals import pre_save
from django.utils.functional import curry
from awx.main.models.base import ActivityStream
@@ -20,5 +21,5 @@ class ActivityStreamMiddleware(object):
return response
def set_actor(self, user, sender, instance, **kwargs):
if sender == ActivityStream and isinstance(user, settings.AUTH_USER_MODEL) and instance.user is None:
if sender == ActivityStream and isinstance(user, User) and instance.user is None:
instance.user = user