Skip to content

Commit

Permalink
fix condition when both record and data have no id
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Aug 13, 2024
1 parent aaf3ae1 commit 68d619b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/neurostore/resources/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def join_tables(self, q, args):
def check_duplicate(cls, data, record):
study_id = data.get("study_id")

if hasattr(record, "id") and record.id == data.get("id"):
if hasattr(record, "id") and record.id and record.id == data.get("id"):
# not a duplicate, same record
return False

Expand Down

0 comments on commit 68d619b

Please sign in to comment.