removed validation
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Failing after 1m38s
Build and deploy the backend to staging / Deploy to staging (pull_request) Has been skipped
Run linting on the backend code / Build (pull_request) Failing after 2m21s
Run testing on the backend code / Build (pull_request) Failing after 2m26s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Failing after 1m38s
Build and deploy the backend to staging / Deploy to staging (pull_request) Has been skipped
Run linting on the backend code / Build (pull_request) Failing after 2m21s
Run testing on the backend code / Build (pull_request) Failing after 2m26s
This commit is contained in:
@@ -4,7 +4,7 @@ from typing import Literal
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import requests
|
||||
from pydantic import BaseModel, Field, field_validator, model_post_init
|
||||
from pydantic import BaseModel, Field
|
||||
from fastapi.responses import RedirectResponse
|
||||
|
||||
from ..supabase.supabase import SupabaseClient
|
||||
@@ -46,7 +46,7 @@ class OrderRequest(BaseModel):
|
||||
supabase_client: SupabaseClient
|
||||
|
||||
|
||||
@field_validator('basket')
|
||||
# @field_validator('basket')
|
||||
def validate_basket(cls, v):
|
||||
"""Validates the basket items.
|
||||
|
||||
@@ -84,11 +84,6 @@ class OrderRequest(BaseModel):
|
||||
self.total_credits += item.unit_credits * basket_item.quantity # increment credit balance
|
||||
|
||||
|
||||
@model_post_init
|
||||
def auto_load_items(self, _):
|
||||
self.load_items_and_price()
|
||||
|
||||
|
||||
def to_paypal_items(self):
|
||||
"""
|
||||
Converts items to the PayPal API item format.
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import os
|
||||
import logging
|
||||
import yaml
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
from supabase import create_client, Client, ClientOptions
|
||||
|
||||
from ..structs.shop import Item, BasketItem
|
||||
from ..constants import PARAMETERS_DIR
|
||||
from ..structs.shop import Item
|
||||
from ..configuration.environment import Environment
|
||||
|
||||
# Silence the supabase logger
|
||||
|
||||
Reference in New Issue
Block a user