Refactor ToggleTenderApproval Logic to Simplify Status Check

- Updated the ToggleTenderApproval method to remove the redundant check for SubmissionMode when determining if an existing tender approval should be deleted.
- This change enhances the clarity of the approval logic and improves maintainability by focusing solely on the Status comparison.
This commit is contained in:
n.nakhostin
2025-09-02 11:56:07 +03:30
parent fbf3165169
commit 9c13b3f27f
+1 -1
View File
@@ -995,7 +995,7 @@ func (s *tenderApprovalService) ToggleTenderApproval(ctx context.Context, req *T
return approval.ToResponseWithTender(nil), nil
}
if existing.Status == req.Status && existing.SubmissionMode == req.SubmissionMode {
if existing.Status == req.Status {
err = s.repository.Delete(ctx, existing.GetID())
if err != nil {
s.logger.Error("Failed to update tender approval", map[string]interface{}{