Skip to content

Commit

Permalink
Fixed duplicated id format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vshand11 committed Jan 16, 2025
1 parent 3ecc0c1 commit 454914b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/file_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def validate_file_id(self, id, line_num):
if self.configs[OMIT_DCF_PREFIX] == False:
msg = f'Line {line_num}: "{id_field_name}": "{id}" is not in correct format. A correct "{id_field_name}" should look like "dg.4DFC/e041576e-3595-5c8b-b0b3-272bc7cb6aa8". You can provide correct "{id_field_name}" or remove the column and let the system generate it for you.'
if not id.startswith("dg.4DFC/"):
self.log.error(msg)
# self.log.error(msg)
return False, msg
else:
uuid = id.split('/')[1]
Expand All @@ -220,12 +220,12 @@ def validate_file_id(self, id, line_num):
else:
if(not is_valid_uuid(id)):
msg = f'Line {line_num}: "{id_field_name}": "{id}" is not in correct format. A correct "{id_field_name}" should look like "e041576e-3595-5c8b-b0b3-272bc7cb6aa8". You can provide correct "{id_field_name}" or remove the column and let the system generate it for you.'
self.log.error(msg)
# self.log.error(msg)
return False, msg
else:
if self.has_file_id:
msg = f'Line {line_num}: "{id_field_name}" is required but not provided. You can provide correct "{id_field_name}" or remove the column and let the system generate it for you.'
self.log.error(msg)
# self.log.error(msg)
return False, msg

return True, None

0 comments on commit 454914b

Please sign in to comment.