Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
antgonza committed Dec 11, 2018
commit 26dca2e00b623963c927828fda9594b550bd58a3
4 changes: 3 additions & 1 deletion qiita_db/metadata_template/base_metadata_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,9 @@ def _update(self, md_template):
# 4 XX.Sample3 physical_specimen_location new location
to_update.reset_index(inplace=True)
new_columns = []
samples_updated = []
for sid, df in to_update.groupby('sample_name'):
samples_updated.append(sid)
# getting just columns: column and to, and then using column
# as index will generate this for XX.Sample2:
# to
Expand All @@ -1381,7 +1383,7 @@ def _update(self, md_template):

nc = list(set(new_columns).union(set(self.categories())))
table_name = self._table_name(self.id)
values = dumps({"columns": new_columns})
values = dumps({"columns": nc})
sql = """UPDATE qiita.{0}
SET sample_values = %s
WHERE sample_id = '{1}'""".format(
Expand Down