Skip to content

Commit

Permalink
Merge pull request #10 from robertatakenaka/0.1.5
Browse files Browse the repository at this point in the history
0.1.5
  • Loading branch information
robertatakenaka authored Oct 5, 2022
2 parents 3ff67da + e42f769 commit 8e34156
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions scielo_classic_website/isisdb/h_record.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

# generated by ModelBuilder
from scielo_classic_website.isisdb.base_h_record import BaseDocumentRecord

Expand Down
11 changes: 7 additions & 4 deletions scielo_classic_website/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __getattr__(self, name):
# fica menos acoplado
if hasattr(self._h_record, name):
return getattr(self._h_record, name)
raise AttributeError(name)
raise AttributeError(f"Document.{name} does not exist")

@property
def journal(self):
Expand Down Expand Up @@ -147,9 +147,12 @@ def records(self, _records):
for _record in _records:
meta_record = MetaRecord(_record)
rec_type = meta_record.rec_type
record = RECORD[rec_type](_record)
self._records[rec_type] = self._records.get(rec_type) or []
self._records[rec_type].append(record)
try:
record = RECORD[rec_type](_record)
self._records[rec_type] = self._records.get(rec_type) or []
self._records[rec_type].append(record)
except KeyError:
pass

def get_record(self, rec_type):
return self._records.get(rec_type)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setuptools.setup(
name="scielo_classic_website",
version="0.1.4",
version="0.1.5",
author="SciELO",
author_email="[email protected]",
description="",
Expand Down

0 comments on commit 8e34156

Please sign in to comment.