diff options
Diffstat (limited to 'jb/models/assignment.py')
| -rw-r--r-- | jb/models/assignment.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jb/models/assignment.py b/jb/models/assignment.py index 1f7033d..fa6ccd5 100644 --- a/jb/models/assignment.py +++ b/jb/models/assignment.py @@ -1,7 +1,9 @@ +import logging from datetime import datetime, timezone from typing import Any, TypedDict from xml.etree import ElementTree +from generalresearch.models.custom_types import AwareDatetimeISO, UUIDStr from mypy_boto3_mturk.type_defs import AssignmentTypeDef from pydantic import ( BaseModel, @@ -14,10 +16,11 @@ from pydantic import ( ) from typing_extensions import Self -from jb.decorators import LOG -from jb.models.custom_types import AMTBoto3ID, AwareDatetimeISO, UUIDStr +from jb.models.custom_types import AMTBoto3ID from jb.models.definitions import AssignmentStatus +logger = logging.getLogger("amtjb") + class AnswerDict(TypedDict): amt_assignment_id: str @@ -140,7 +143,7 @@ class Assignment(AssignmentStub): values["tsid"] = TypeAdapter(UUIDStr).validate_python(tsid) except ValidationError as e: # Don't break the model validation if a baddie messes with the tsid in the answer. - LOG.warning(e) + logger.warning(e) values["tsid"] = None return values |
