Skip to content

Commit

Permalink
Fix: Also convert uuid strings to UUID objects
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Feb 27, 2017
1 parent 438e29d commit 51084c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stream_django/enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from collections import defaultdict
import operator
import itertools
import uuid

try:
from django.apps import apps
Expand Down Expand Up @@ -122,7 +123,10 @@ def _inject_objects(self, activities, objects, fields):
try:
f_id = int(f_id)
except ValueError:
pass
try:
f_id = uuid.UUID(f_id)
except ValueError:
pass

instance = objects[f_ct].get(f_id)
if instance is None:
Expand Down

0 comments on commit 51084c1

Please sign in to comment.