Skip to content

Commit

Permalink
Merge pull request #183 from saltduck/saltduck-patch-1
Browse files Browse the repository at this point in the history
Fix bug:Cannot use custom activity class in AggregatedFeed
  • Loading branch information
JelteF committed Nov 30, 2016
2 parents 81cd5e5 + b3a0f55 commit 6c2c5d2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from stream_framework.activity import Activity
from stream_framework.exceptions import SerializationException
from stream_framework.serializers.activity_serializer import ActivitySerializer
from stream_framework.serializers.utils import check_reserved
Expand Down Expand Up @@ -31,7 +30,7 @@ class AggregatedActivitySerializer(BaseAggregatedSerializer):
def dumps(self, aggregated):
self.check_type(aggregated)

activity_serializer = self.activity_serializer_class(Activity)
activity_serializer = self.activity_serializer_class(self.activity_class)
# start by storing the group
parts = [aggregated.group]
check_reserved(aggregated.group, [';;'])
Expand Down Expand Up @@ -70,7 +69,7 @@ def dumps(self, aggregated):
return serialized

def loads(self, serialized_aggregated):
activity_serializer = self.activity_serializer_class(Activity)
activity_serializer = self.activity_serializer_class(self.activity_class)
try:
serialized_aggregated = serialized_aggregated[2:]
parts = serialized_aggregated.split(';;')
Expand Down

0 comments on commit 6c2c5d2

Please sign in to comment.