Skip to content

Commit

Permalink
Fix Curation primary key creation from spikesorting key (#1114)
Browse files Browse the repository at this point in the history
* fix primary key creation

* update changelog
  • Loading branch information
samuelbray32 authored Sep 18, 2024
1 parent b68aea0 commit 8be2f56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dj.FreeTable(dj.conn(), "common_session.session_group").drop()

- Fix bug in `get_group_by_shank` #1096
- Fix bug in `_compute_metric` #1099
- Fix bug in `insert_curation` returned key #1114

## [0.5.3] (August 27, 2024)

Expand Down
5 changes: 3 additions & 2 deletions src/spyglass/spikesorting/v0/spikesorting_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ def insert_curation(
Curation.insert1(sorting_key, skip_duplicates=True)

# get the primary key for this curation
c_key = (Curation & sorting_key).fetch1("KEY")
curation_key = {item: sorting_key[item] for item in c_key}
curation_key = {
item: sorting_key[item] for item in Curation.primary_key
}

return curation_key

Expand Down

0 comments on commit 8be2f56

Please sign in to comment.