Skip to content

Commit

Permalink
Merge pull request #1647 from materialsproject/dev
Browse files Browse the repository at this point in the history
client: init attributes if dataframe
  • Loading branch information
tschaume authored Oct 16, 2023
2 parents b22a86a + 7e013a0 commit 370be3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mpcontribs-client/mpcontribs/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,11 @@ def submit_contributions(
logger.warning("storing structure properties not supported, yet!")
del dct["properties"]
elif is_table:
table = element if isinstance(element, Table) else Table(element)
table = element
if not isinstance(table, Table):
table = Table(element)
table.attrs = element.attrs

table._clean()
dct = table.to_dict(orient="split")
elif is_attachment:
Expand Down

0 comments on commit 370be3f

Please sign in to comment.