Skip to content

Commit

Permalink
Adiciona href em add_related_article
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelveigarangel committed Nov 22, 2024
1 parent 25d2a5e commit 0052a12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opac/webapp/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,14 +363,15 @@ def add_doi_with_lang(self, language, doi):
_doi_with_lang_item.language = language
self.doc.doi_with_lang.append(_doi_with_lang_item)

def add_related_article(self, doi, ref_id, related_type):
def add_related_article(self, doi, ref_id, related_type, href):
# related_article = EmbeddedDocumentListField(RelatedArticle))
if self.doc.related_articles is None:
self.doc.related_articles = []
_related_article = models.RelatedArticle()
_related_article.doi = doi
_related_article.ref_id = ref_id
_related_article.related_type = related_type
_related_article.href = href
self.doc.related_articles.append(_related_article)

def add_xml(self, xml):
Expand Down Expand Up @@ -576,6 +577,7 @@ def ArticleFactory(
doi=item.get("doi"),
ref_id=item.get("ref_id"),
related_type=item.get("related_type"),
href=item.get("href")
)

factory.publish_document(data.get("created"), data.get("updated"), data.get("is_public"))
Expand Down

0 comments on commit 0052a12

Please sign in to comment.