Skip to content

Commit

Permalink
Fix insert file check
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Oct 1, 2024
1 parent 81467ca commit 6fff329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions isimip_publisher/utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def insert_file(session, version, dataset_path, uuid, name, path, size,
raise RuntimeError(f'File {path} is already stored with the same version, but a different checksum')
if file.checksum_type != checksum_type:
raise RuntimeError(f'File {path} is already stored with the same version, but a different checksum_type')
if DeepDiff(file.netcdf_header, netcdf_header, ignore_numeric_type_changes=False):
if DeepDiff(file.netcdf_header, netcdf_header, ignore_numeric_type_changes=True):
raise RuntimeError(f'File {path} is already stored with the same version, but a different netcdf_header')
if file.specifiers != specifiers:
raise RuntimeError(f'File {path} is already stored with the same version, but different specifiers')
Expand Down Expand Up @@ -522,7 +522,7 @@ def insert_file_link(session, version, target_file_path, dataset_path,
if file.checksum_type != checksum_type:
raise RuntimeError(f'File link {path} is already stored with the same version,'
' but a different checksum_type')
if DeepDiff(file.netcdf_header, netcdf_header, ignore_numeric_type_changes=False):
if DeepDiff(file.netcdf_header, netcdf_header, ignore_numeric_type_changes=True):
raise RuntimeError(f'File link {path} is already stored with the same version,'
' but a different netcdf_header')
if file.specifiers != specifiers:
Expand Down

0 comments on commit 6fff329

Please sign in to comment.