Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kflemin authored Jan 18, 2024
2 parents f774f62 + 35b25f0 commit 2fc9f08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Changelog

0.4.2
-----
WHat's Changed
What's Changed
**************

* add new method to get AT submission metadata by @kflemin in https://github.com/SEED-platform/py-seed/pull/39
Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
py-SEED
=========
===========


.. image:: https://github.com/seed-platform/py-seed/actions/workflows/ci.yml/badge.svg?branch=develop
:target: https://github.com/seed-platform/py-seed/actions/workflows/ci.yml/badge.svg
Expand Down
7 changes: 5 additions & 2 deletions pyseed/seed_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ def retrieve_at_submission_and_update(self, audit_template_submission_id: int, c
audit_template_submission_id (int): ID of the AT submission report (different than building ID)
cycle_id (int): Cycle ID in SEED (needed for XML but not actually for PDF)
seed_id (int): PropertyView ID in SEED
file_format (str): pdf, or xml report, defaults to pdf
file_format (str): pdf or xml report, defaults to pdf
filename (str): filename to use to upload to SEED
Returns:
Expand All @@ -1464,7 +1464,8 @@ def retrieve_at_submission_and_update(self, audit_template_submission_id: int, c
"""

# api/v3/audit_template/pk/get_submission
# accepts pdf, xml
# accepts pdf or xml

response = self.client.get(
None,
required_pk=False,
Expand All @@ -1475,6 +1476,7 @@ def retrieve_at_submission_and_update(self, audit_template_submission_id: int, c

if response['status'] == 'success':
if report_format.lower() == 'pdf':

# for PDF, store pdf report as inventory document
pdf_file = response['content']
if not filename:
Expand All @@ -1492,6 +1494,7 @@ def retrieve_at_submission_and_update(self, audit_template_submission_id: int, c
)
response2['pdf_report'] = pdf_file
else:

# assume XML. for XML, update property with BuildingSync
# now post to api/v3/properties/PK/update_with_buildingsync
xml_file = response['content']
Expand Down

0 comments on commit 2fc9f08

Please sign in to comment.