Skip to content

Commit

Permalink
🐛 fix for material certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
ianardee committed Dec 15, 2023
1 parent 8d09748 commit 7d34fae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 1 addition & 7 deletions docs/product/material_certificate_v1.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
Material Certificate V1
-----------------------

**Sample Code (sync):**
**Sample Code:**

.. literalinclude:: /extras/code_samples/material_certificate_v1.txt
:language: Python

**Smaple Code (async):**

.. literalinclude:: /extras/code_samples/material_certificate_v1_async.txt
:language: Python


.. autoclass:: mindee.product.material_certificate.material_certificate_v1.MaterialCertificateV1
:members:
:inherited-members:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ def __init__(self, raw_prediction: StringDict):
self.prediction = MaterialCertificateV1Document(raw_prediction["prediction"])
self.pages = []
for page in raw_prediction["pages"]:
self.pages.append(Page(MaterialCertificateV1Document, page))
try:
page_production = page["prediction"]
except KeyError:
continue
if page_production:
self.pages.append(Page(MaterialCertificateV1Document, page))

0 comments on commit 7d34fae

Please sign in to comment.