Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Bug fix: Event must not assume that AssignmentId is always present.
Browse files Browse the repository at this point in the history
(HITExpired events, for example, do not have this field.)
  • Loading branch information
sethoscope committed Feb 4, 2011
1 parent 759cf13 commit 67b4abc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boto/mturk/notification.py
Expand Up @@ -85,7 +85,8 @@ def __init__(self, d):
self.event_time_str = d['EventTime'] self.event_time_str = d['EventTime']
self.hit_type = d['HITTypeId'] self.hit_type = d['HITTypeId']
self.hit_id = d['HITId'] self.hit_id = d['HITId']
self.assignment_id = d['AssignmentId'] if 'AssignmentId' in d: # Not present in all event types
self.assignment_id = d['AssignmentId']


#TODO: build self.event_time datetime from string self.event_time_str #TODO: build self.event_time datetime from string self.event_time_str


Expand Down

0 comments on commit 67b4abc

Please sign in to comment.