Skip to content

Commit

Permalink
[IMP] add company params to subscripton request create
Browse files Browse the repository at this point in the history
  • Loading branch information
danypr92 committed Feb 13, 2024
1 parent d2219a2 commit 7351077
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cooperator_api/services/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def date_validator(field, value, error):
"firstname": {"type": "string", "required": True, "empty": False},
"lastname": {"type": "string", "required": True, "empty": False},
"is_company": {"type": "boolean", "required": True},
"company_name": {"type": "string", "required": False},
"company_email": {"type": "string", "required": False},
"email": {"type": "string", "required": True, "empty": False},
"ordered_parts": {"type": "integer", "required": True},
"share_product": {"type": "integer", "required": True},
Expand Down
2 changes: 2 additions & 0 deletions cooperator_api/services/subscription_request_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def _prepare_create(self, params):
"firstname": params["firstname"],
"lastname": params["lastname"],
"is_company": params["is_company"],
"company_name": params.get("company_name"),
"company_email": params.get("company_email"),
"email": params["email"],
"ordered_parts": params["ordered_parts"],
"share_product_id": share_product_id.id,
Expand Down

0 comments on commit 7351077

Please sign in to comment.