aboutsummaryrefslogtreecommitdiff
path: root/jb/models/assignment.py
diff options
context:
space:
mode:
authorMax Nanis2026-09-10 10:27:51 -0700
committerMax Nanis2026-09-10 10:27:51 -0700
commitbbc373bd2e9617c8da829b3a180e9c42f139a380 (patch)
tree18fea752398e948ee5ddbc57f3ab871e8caae5fb /jb/models/assignment.py
parent4dca7296742b607e74f16e2f6484c51163a41ace (diff)
downloadamt-jb-bbc373bd2e9617c8da829b3a180e9c42f139a380.tar.gz
amt-jb-bbc373bd2e9617c8da829b3a180e9c42f139a380.zip
Less from init, more from generalresearch, basic db test from shared conftest
Diffstat (limited to 'jb/models/assignment.py')
-rw-r--r--jb/models/assignment.py9
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