Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
frances-h committed Aug 17, 2023
1 parent c136cf6 commit 6f8a243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdv/data_processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def _create_config(self, data, columns_created_by_constraints):
is_numeric
)
sdtypes[column] = 'text'
elif column == self.metadata.primary_key or column in self.metadata.alternate_keys:
elif column in self._keys:
prefix = None
if not is_numeric:
prefix = 'sdv-id-'
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data_processing/test_data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ def test__create_config(self):
dp.metadata.primary_key = 'id'
dp.metadata.alternate_keys = ['id_no_regex', 'id_numeric']
dp._primary_key = 'id'
dp._keys = ['id']
dp._keys = ['id', 'id_no_regex', 'id_numeric']
dp.metadata.columns = {
'int': {'sdtype': 'numerical'},
'float': {'sdtype': 'numerical'},
Expand Down

0 comments on commit 6f8a243

Please sign in to comment.