Skip to content

Commit

Permalink
updated lowest level hierarchy validation for target HLM -5948
Browse files Browse the repository at this point in the history
  • Loading branch information
nitish-egov authored May 21, 2024
1 parent 9a3f8cc commit 7518f48
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function validateTargets(data: any[], lowestLevelHierarchy: any, errors: any[],
if (Array.isArray(data[key])) {
const boundaryData = data[key];
boundaryData.forEach((obj: any, index: number) => {
if (obj.hasOwnProperty(lowestLevelHierarchy)) {
if (obj.hasOwnProperty(lowestLevelHierarchy)&&obj[lowestLevelHierarchy]) {
const localizedTargetColumnName = getLocalizedName("ADMIN_CONSOLE_TARGET", localizationMap);
const target = obj[localizedTargetColumnName];
if (target === undefined || typeof target !== 'number' || target <= 0 || target > 100000 || !Number.isInteger(target)) {
Expand Down

0 comments on commit 7518f48

Please sign in to comment.