Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
af-egr committed Jan 24, 2025
1 parent 65e2f65 commit 5621f03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/modules/proposal/dto/set-uac-approval.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export class SetUacApprovalDto {
dataAmount?: number;

@Expose()
@ValidateIf((obj: SetUacApprovalDto) => obj.value === true)
@ValidateIf(
(obj: SetUacApprovalDto) =>
obj.value === true && typeof obj.conditionReasoning === 'string' && obj.conditionReasoning.trim() !== '',
)
@MaxLength(10_000)
conditionReasoning?: string;

Expand Down
2 changes: 1 addition & 1 deletion src/modules/proposal/utils/add-location-vote.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const addUacApprovalWithCondition = (
> = {
location,
isAccepted: false,
uploadId: upload._id,
uploadId: upload?._id,
dataAmount: vote.dataAmount,
isContractSigned: false,
conditionReasoning,
Expand Down

0 comments on commit 5621f03

Please sign in to comment.