Skip to content

Commit

Permalink
Fix: Allow UUID model IDs
Browse files Browse the repository at this point in the history
JelteF committed Feb 27, 2017
1 parent 4d0acd0 commit 438e29d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stream_django/enrich.py
Original file line number Diff line number Diff line change
@@ -118,7 +118,13 @@ def _inject_objects(self, activities, objects, fields):
if not self.is_ref(activity, field):
continue
f_ct, f_id = activity[field].split(':')
instance = objects[f_ct].get(int(f_id))

try:
f_id = int(f_id)
except ValueError:
pass

instance = objects[f_ct].get(f_id)
if instance is None:
activity.track_not_enriched_field(field, activity[field])
else:

0 comments on commit 438e29d

Please sign in to comment.