Skip to content

Commit

Permalink
Merge pull request #206 from facultyai/fix-api-key-deserialisation
Browse files Browse the repository at this point in the history
Fix API Key Deserialisation
  • Loading branch information
acroz authored Aug 9, 2023
2 parents 353313a + 4068e42 commit 50f415e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion faculty/clients/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""

from attr import attrs, attrib
from marshmallow import fields
from marshmallow import fields, post_load

from faculty.clients.base import BaseSchema, BaseClient

Expand Down Expand Up @@ -46,6 +46,10 @@ class _APIKeySchema(BaseSchema):
material = fields.String(required=True)
enabled = fields.Boolean(required=True)

@post_load
def make_api_key(self, data, **kwargs):
return APIKey(**data)


class APIClient(BaseClient):
"""Client for the Faculty API service.
Expand Down

0 comments on commit 50f415e

Please sign in to comment.