mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 22:39:43 -04:00
Merge pull request #298 from alphagov/add-user-to-job
Add created_by for jobs
This commit is contained in:
@@ -153,6 +153,10 @@ class ApiKeySchema(BaseSchema):
|
||||
|
||||
|
||||
class JobSchema(BaseSchema):
|
||||
created_by_user = fields.Nested(UserSchema, attribute="created_by",
|
||||
dump_to="created_by", only=["id", "name"], dump_only=True)
|
||||
created_by = field_for(models.Job, 'created_by', required=True, load_only=True)
|
||||
|
||||
class Meta:
|
||||
model = models.Job
|
||||
|
||||
|
||||
Reference in New Issue
Block a user