diff --git a/core/graphene/object_types.py b/core/graphene/object_types.py index ef27b4b3..2d15bff5 100644 --- a/core/graphene/object_types.py +++ b/core/graphene/object_types.py @@ -40,6 +40,8 @@ from core.models import ( Vendor, Wishlist, ) +from payments.graphene.object_types import TransactionType +from payments.models import Transaction logger = __import__("logging").getLogger(__name__) @@ -313,6 +315,7 @@ class OrderType(DjangoObjectType): is_whole_digital = Float(description=_("are all products in the order digital")) attributes = GenericScalar(description=_("attributes")) notifications = GenericScalar(description=_("notifications")) + payments_transactions = Field(TransactionType, description=_("transactions for this order")) class Meta: model = Order @@ -329,6 +332,7 @@ class OrderType(DjangoObjectType): "total_quantity", "is_whole_digital", "human_readable_id", + "payments_transactions", ) description = _("orders") @@ -344,6 +348,9 @@ class OrderType(DjangoObjectType): def resolve_attributes(self, _info): return camelize(self.attributes) + def resolve_payments_transactions(self, _info) -> None | Transaction: + return None or self.payments_transactions + class ProductImageType(DjangoObjectType): image = String(description=_("image url")) diff --git a/docker-compose.yml b/docker-compose.yml index d167de26..5cdaf487 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -138,6 +138,8 @@ services: - BROKER_URL=${CELERY_BROKER_URL} - TZ=${TIME_ZONE} depends_on: + database: + condition: service_healthy redis: condition: service_healthy elasticsearch: @@ -164,6 +166,8 @@ services: - BROKER_URL=${CELERY_BROKER_URL} - TZ=${TIME_ZONE} depends_on: + database: + condition: service_healthy redis: condition: service_healthy elasticsearch: @@ -190,12 +194,12 @@ services: - BROKER_URL=${CELERY_BROKER_URL} - TZ=${TIME_ZONE} depends_on: + database: + condition: service_healthy worker: condition: service_healthy stock_updater: condition: service_healthy - database: - condition: service_healthy logging: *default-logging healthcheck: test: [ "CMD", "bash", "-c", "pgrep -f 'celery beat' >/dev/null" ]