Skip to content

Commit

Permalink
add email to order mapper (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
turtle-94 authored Feb 22, 2024
1 parent 9d07c83 commit dfe3b76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions oscar_odin/mappings/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ class OrderToResource(odin.Mapping):
from_obj = OrderModel
to_obj = resources.order.Order

@odin.assign_field
def email(self) -> str:
"""Map order email."""
return self.source.email

@odin.assign_field
def user(self) -> Optional[resources.auth.User]:
"""Map user."""
Expand Down

0 comments on commit dfe3b76

Please sign in to comment.