From 0177921e84531c32fbdd09a4889487e619010b69 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 30 May 2020 11:11:52 +0530 Subject: [PATCH] Disabled as it fucked with the return of Payment and Receipt as they had only one journal when sent to front end --- brewman/schemas/voucher.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/brewman/schemas/voucher.py b/brewman/schemas/voucher.py index 173a2185..a71dcb7b 100644 --- a/brewman/schemas/voucher.py +++ b/brewman/schemas/voucher.py @@ -164,12 +164,12 @@ class Voucher(VoucherIn): return value return datetime.strptime(value, "%d-%b-%Y").date() - @validator("journals") - def validate_enough_journals(cls, value: List[Journal]): - if 0 < len(value) < 2: - raise ValueError("Not enough journals") - return value - + # @validator("journals") + # def validate_enough_journals(cls, value: List[Journal]): + # if 0 < len(value) < 2: + # raise ValueError("Not enough journals") + # return value + # @validator("journals") def validate_signed_amount(cls, value: List[Journal]): if sum(x.debit * x.amount for x in value) != 0: