Skip to content

Commit 852f5a4

Browse files
author
Thinh Nguyen
committed
bugfix in paramset_name -> paramset_idx
1 parent e9191dd commit 852f5a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

elements_ephys/ephys.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ def insert_new_params(cls, processing_method: str, paramset_idx: int, paramset_d
234234
q_param = cls & {'param_set_hash': param_dict['param_set_hash']}
235235

236236
if q_param: # If the specified param-set already exists
237-
pname = q_param.fetch1('param_set_name')
238-
if pname == paramset_idx: # If the existed set has the same name: job done
237+
pname = q_param.fetch1('paramset_idx')
238+
if pname == paramset_idx: # If the existing set has the same paramset_idx: job done
239239
return
240240
else: # If not same name: human error, trying to add the same paramset with different name
241-
raise dj.DataJointError('The specified param-set already exists - name: {}'.format(pname))
241+
raise dj.DataJointError('The specified param-set already exists - paramset_idx: {}'.format(pname))
242242
else:
243243
cls.insert1(param_dict)
244244

0 commit comments

Comments
 (0)